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.
New 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
Add lint inherent_associated_pub_const_missing #714
Add lint inherent_associated_pub_const_missing #714
Changes from 10 commits
d1ba5a7
37702f4
9ba6760
0c677cc
79adc6d
6ff5d23
bd81dc1
99b523d
3995496
8042812
938db7d
ea1f008
f11a39f
76b2b57
90c3172
49eb155
4cf6944
4081a40
c4062cf
11c7098
afb330a
60b2ed3
353d8a8
c42b06c
7da4ce5
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.
Ah one last test case is needed here.
The following might not always be a breaking change, and should be covered by a separate lint:
to
The reason this might not be breaking is that if both
Example
andTrait
are in a prelude, or if theTrait
trait is already otherwise in scope,Example::N
will continue to work. In the original code that refers to an inherent const, but in the new code it's a trait's const, equivalent to<Example as Trait>::N
in explicit form.To fix this, we allow the query to look at all
impl
blocks (includingimpl Trait for Example
ones) and not just inherentimpl
(onlyimpl Example
) blocks:It would be great if you could add the above code as a test case here.