1 error[E0597]: `y` does not live long enough
2 --> $DIR/pattern_substs_on_brace_struct.rs:5:28
4 LL | let foo = Foo { field: &y };
5 | ^^ borrowed value does not live long enough
7 LL | let Foo::<'static> { field: _z } = foo;
8 | ---------------------------- type annotation requires that `y` is borrowed for `'static`
10 | - `y` dropped here while still borrowed
12 error[E0597]: `y` does not live long enough
13 --> $DIR/pattern_substs_on_brace_struct.rs:12:28
15 LL | let foo = Foo { field: &y };
16 | ^^ borrowed value does not live long enough
18 LL | Foo::<'static> { field: _z } => {
19 | ---------------------------- type annotation requires that `y` is borrowed for `'static`
22 | - `y` dropped here while still borrowed
24 error: aborting due to 2 previous errors
26 For more information about this error, try `rustc --explain E0597`.