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.
Various improvements to the
incompatible_msrv
lint #14433New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Various improvements to the
incompatible_msrv
lint #14433Changes from all commits
d5fbd23
4209729
56c86d1
befc5d7
bdcdc38
026f308
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this only add the note under
cfg(feature)
? I think this is only useful otherwise forcfg(test)
, which feels like an edge case to me IMO. I feel like it's silly to even lint in tests, but what are your thoughts here?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My rationale was that the lint only triggers when a MSRV is set on the current crate. However, when features are used, the author might want to express the fact that, in some configurations, they can go beyond the default MSRV. If the used entity is not behind a crate feature or a
cfg
item (possibly set by the build script), then it is likely that this is a real issue with the default MSRV, and it is probably a bad idea to suggest silencing Clippy with a#[clippy::msrv]
attribute there.For example,
anyhow
has a MSRV of 1.39, but when compiled with more recent compilers, it takes advantage ofstd::backtrace::Backtrace
. Those uses arecfg
gated. I feel this is the best place to make the suggestion without risking making a counterproductive one.