-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
ICE in clippy::borrow_interior_mutable_const #12979
Comments
Looks like the lint calls That specific repro seems to only ICE in nightly, probably because of #12691 where the lint was made stronger, but the root cause has existed for longer it seems. Smaller repro that also ICEs on stable: use std::cell::Cell;
const C: ((i32, Cell<i32>), i32) = ((0, Cell::new(1)), 2);
fn main() {
let _x = &C.0;
} |
Summary
reports:
The problem is this unwrap_branch:
rust-clippy/clippy_lints/src/non_copy_const.rs
Lines 222 to 223 in 0ce07f6
Version
Figuring out what's broken here is blocking rust-lang/rust#126793
The text was updated successfully, but these errors were encountered: