- Notifications
You must be signed in to change notification settings - Fork 13.9k
Closed
Labels
A-NLLArea: Non-lexical lifetimes (NLL)Area: Non-lexical lifetimes (NLL)E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.I-needs-decisionIssue: In need of a decision.Issue: In need of a decision.NLL-soundWorking towards the "invalid code does not compile" goalWorking towards the "invalid code does not compile" goal
Milestone
Description
I'm getting a ICE when compiling my crate with the current nightly. This minimal example reproduces it:
#![feature(nll)] #![feature(thread_local)] #[thread_local] static mut X1:u64 = 0; struct S1 { a:&'static mut u64, } impl S1 { fn new(_x:u64) -> S1 { S1 { a:unsafe { &mut X1 } } } } fn main() { S1::new(0).a; } error: internal compiler error: unexpected region for local data ReStatic --> src/main.rs:12:30 | 12 | S1 { a:unsafe { &mut X1 } } | schneiderfelipe
Metadata
Metadata
Assignees
Labels
A-NLLArea: Non-lexical lifetimes (NLL)Area: Non-lexical lifetimes (NLL)E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.I-needs-decisionIssue: In need of a decision.Issue: In need of a decision.NLL-soundWorking towards the "invalid code does not compile" goalWorking towards the "invalid code does not compile" goal