-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Properly emit const fn UnstableInStable lint when reasonable #117571
Conversation
7b199eb
to
fee2462
Compare
(rustbot has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
(Removed the draft status, our waiting-on labels are a better alternative.) |
I mean, I personally went for draft to indicate that it hasn't been finished initially, whereas "waiting on author" doesn't necessarily mean that. But, sure. You're the reviewer, so, do what you want to make it easier to filter out until it's done. |
fee2462
to
7b865aa
Compare
This comment has been minimized.
This comment has been minimized.
☔ The latest upstream changes (presumably #119237) made this pull request unmergeable. Please resolve the merge conflicts. |
@clarfonthey any updates on this? Thanks |
Apologies for taking a while to get to this. Currently looking into rebasing the changes I have so far and actually completing this. |
7b865aa
to
d834ea0
Compare
The job Click to see the possible cause of the failure (guessed by this bot)
|
Going to be honest, I've kind of lost the desire to work on this, and the lint seems to now actually do the right thing even though it still breaks in a lot of circumstances. I'm going to close this for now but anyone else is free to pick back up this work and improve the lint themselves. |
Right now, some cases of calling const-unstable functions in const-stable functions will emit a generic const-unstable lint instead of the unstable-in-stable lint. This is less than ideal, since these cases also don't explain what feature is causing the error.
This hopefully updates these cases to emit the proper lint, which provides better errors.
The code that interjects and adds unstable-in-stable lints feels a bit jank, and I'm sure that a refactor is due at some point, but I mostly just was frustrated with the compiler giving me less-than-helpful errors and wanted to fix that, so, this is the result.
Currently marked as draft because not all the tests are passing yet, and I need to do some more debugging. Still figured I'd share what I have anyway.