]> git.lizzy.rs Git - rust.git/blob - tests/ui/nll/user-annotations/pattern_substs_on_brace_struct.stderr
Re-add #[allow(unused)] attr
[rust.git] / tests / ui / nll / user-annotations / pattern_substs_on_brace_struct.stderr
1 error[E0597]: `y` does not live long enough
2   --> $DIR/pattern_substs_on_brace_struct.rs:5:28
3    |
4 LL |     let foo = Foo { field: &y };
5    |                            ^^ borrowed value does not live long enough
6 LL |
7 LL |     let Foo::<'static> { field: _z } = foo;
8    |         ---------------------------- type annotation requires that `y` is borrowed for `'static`
9 LL | }
10    | - `y` dropped here while still borrowed
11
12 error[E0597]: `y` does not live long enough
13   --> $DIR/pattern_substs_on_brace_struct.rs:12:28
14    |
15 LL |     let foo = Foo { field: &y };
16    |                            ^^ borrowed value does not live long enough
17 ...
18 LL |         Foo::<'static> { field: _z } => {
19    |         ---------------------------- type annotation requires that `y` is borrowed for `'static`
20 ...
21 LL | }
22    | - `y` dropped here while still borrowed
23
24 error: aborting due to 2 previous errors
25
26 For more information about this error, try `rustc --explain E0597`.