Use a slightly different work-around for criterion #32
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
My motivation is slightly unrelated to this package but I was hoping this general technique might be acceptable you and/or the wider Rust community.
Putting dev-dependencies as optional dependencies interferes with Debian packaging. The automated packaging tools are set up to avoid dev-dependencies; however all optional dependencies have to be installable for Debian QA purposes. Linking the QA of criterion to the QA of thread_local makes things inconvenient. We can (and do) patch this out in Debian, but apparently quite a few crates are using this current work-around, and maintaining these patches is time-consuming.
This PR changes the current work-around to a different work-around that doesn't affect automated crate-processing tools so much. This is not specific to Debian, for example other commenters in rust-lang/cargo#1596 noted that the current work-around is visible on crates.io and might mislead some users.