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
experiment: remove value-based reasoning for interior mutability #122789
Conversation
r? @wesleywiser rustbot has assigned @wesleywiser. Use |
Some changes occurred in exhaustiveness checking cc @Nadrieril Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt |
9051c32
to
3660dd9
Compare
Sorry for the pings, I forgot to mark this a draft. (Why does github make that so annoying? Just give me a checkbox, instead of remember this decision for the next PR...) |
@bors try |
…<try> experiment: remove value-based reasoning for interior mutability This also stabilizes `const_refs_to_cell` as it's just a crater experiment anyway and that reduces the amount of regressions.
@@ -2,6 +2,7 @@ | |||
|
|||
#![allow(rustc::untranslatable_diagnostic)] | |||
#![allow(rustc::diagnostic_outside_of_impl)] | |||
#![feature(freeze)] |
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.
If this actually gets merged, please set this only when feature = "rustc"
. This crate needs to build on stable for rust-analyzer.
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.
is it needed just for this?
PatOrWild::Wild => &Wildcard, |
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.
This is an experiment, it won't get merged. Also the crate can't build on stable any more with this rustc change.
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.
is it needed just for this?
Yes. That previously got promoted even though other enum variants have interior mutability, which is not entirely a sound thing to do (Cc rust-lang/unsafe-code-guidelines#493).
The job Click to see the possible cause of the failure (guessed by this bot)
|
☀️ Try build successful - checks-actions |
@craterbot check |
👌 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
🚧 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
🎉 Experiment
|
Well I think that answers the question. ;) |
This also stabilizes
const_refs_to_cell
as it's just a crater experiment anyway and that reduces the amount of regressions.