-
Notifications
You must be signed in to change notification settings - Fork 64
Update toolchain to 2025-11-13 #1820
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
Conversation
|
Are you sure adding the |
|
I mean, this implies that we will never leverage unused warnings in pearlite. |
|
No I'm not sure yet. I'm still just trying stuff out. |
|
My current plan is to make Pearlite go through the liveness analysis in MIR. The challenge is to dodge the borrow checker. We currently do that by removing the code of Pearlite closures, but now I need to find a way to put it back. |
|
Could you explain the problem? |
|
The liveness analysis is what enables the |
|
it seems like it should be possible to perform the lowering to mir, run the liveness analysis ourselves for error reporting but then continue to no-op the body in queries to trick borrowck. |
|
Is that liveness analysis the same as the one used in borrowck? If so, we should be careful not to break borrowck by providing it inconsistent information. |
|
No it happens after |
9f0d531 to
dd87ed6
Compare
|
I've got a working fix for the unused variable warnings, but it currently relies on exposing the private definition of |
dd87ed6 to
429b789
Compare
| // This is a terrible hack but it shouldn't affect correctness: | ||
| // we've already copied MIR bodies right after borrow checking. | ||
| // This is only used for warnings about unused variables. | ||
| let mut mir = mir.risky_hack_borrow_mut(); |
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.
Shiny new hack that was merged in rustc this week!
Weird: I'm getting warnings about unused variables for all logic functions. Reason: the unused variables lint now works on MIR rust-lang/rust#142390