]> git.lizzy.rs Git - rust.git/blob - src/test/ui/nll/user-annotations/adt-nullary-enums.stderr
Fix a few tests with target-specific output
[rust.git] / src / test / ui / nll / user-annotations / adt-nullary-enums.stderr
1 error[E0597]: `c` does not live long enough
2   --> $DIR/adt-nullary-enums.rs:44:41
3    |
4 LL |         SomeEnum::SomeVariant(Cell::new(&c)), //~ ERROR
5    |                                         ^^ borrowed value does not live long enough
6 ...
7 LL | }
8    | - `c` dropped here while still borrowed
9    |
10    = note: borrowed value must be valid for the static lifetime...
11
12 error[E0597]: `c` does not live long enough
13   --> $DIR/adt-nullary-enums.rs:52:41
14    |
15 LL |         SomeEnum::SomeVariant(Cell::new(&c)), //~ ERROR
16    |                                         ^^ borrowed value does not live long enough
17 ...
18 LL | }
19    | - `c` dropped here while still borrowed
20    |
21 note: borrowed value must be valid for the lifetime 'a as defined on the function body at 49:35...
22   --> $DIR/adt-nullary-enums.rs:49:35
23    |
24 LL | fn annot_reference_named_lifetime<'a>(_d: &'a u32) {
25    |                                   ^^
26
27 error[E0597]: `c` does not live long enough
28   --> $DIR/adt-nullary-enums.rs:65:45
29    |
30 LL |             SomeEnum::SomeVariant(Cell::new(&c)), //~ ERROR
31    |                                             ^^ borrowed value does not live long enough
32 ...
33 LL |     };
34    |     - `c` dropped here while still borrowed
35    |
36 note: borrowed value must be valid for the lifetime 'a as defined on the function body at 61:46...
37   --> $DIR/adt-nullary-enums.rs:61:46
38    |
39 LL | fn annot_reference_named_lifetime_in_closure<'a>(_: &'a u32) {
40    |                                              ^^
41
42 error: aborting due to 3 previous errors
43
44 For more information about this error, try `rustc --explain E0597`.