-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-NLLArea: Non-lexical lifetimes (NLL)Area: Non-lexical lifetimes (NLL)NLL-soundWorking towards the "invalid code does not compile" goalWorking towards the "invalid code does not compile" goalT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Milestone
Description
The following test passes NLL, but ought not to:
#![feature(nll)]
struct Foo<'a>(&'a u32);
fn main() {
let y = 22;
let foo = Foo(&y);
let Foo::<'static>(z) = foo;
}
As does this one:
#![feature(nll)]
struct Foo<'a> { field: &'a u32 }
fn main() {
let y = 22;
let foo = Foo { field: &y };
let Foo::<'static> { field: z } = foo;
}
Broken out from #47184
Metadata
Metadata
Assignees
Labels
A-NLLArea: Non-lexical lifetimes (NLL)Area: Non-lexical lifetimes (NLL)NLL-soundWorking towards the "invalid code does not compile" goalWorking towards the "invalid code does not compile" goalT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.