Closed
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