-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
fix: missing_const_for_fn
FP on unstable const traits
#14294
Conversation
r? @Alexendoo rustbot has assigned @Alexendoo. Use |
r? clippy |
You should add a separate "Closes #14290" line to the description so that the issue and the PR are linked. |
cda1dc4
to
0bb2e7f
Compare
r? clippy |
I sadly don't have the time to review this rn. Sorry for bouncing it again 🙈 r? clippy |
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.
The change LGTM, thanks!
There's still some issues with how qualify_min_const_fn
deals with const traits (for example, the issue14290::f
test case still gets a false positive warning when adding the feature gate and removing the msrv attribute; it needs a T: const Add
bound in order to be a const fn
which the code doesn't seem to account for).
However, I'm pretty sure that that is a pre-existing issue and this PR shouldn't be at fault for that (since this just adapts to the rustc change that const stability is not a property of trait methods anymore and is instead inherited from the parent trait afaict, and as such basically keeps the behavior that was there before the rustc change).
Closes #14020
Closes #14290
Closes #14091
Add checks for unstable const traits.
changelog: [
missing_const_for_fn
] fix FP on unstable const traits