42 lines
1.7 KiB
Plaintext
42 lines
1.7 KiB
Plaintext
|
error[E0597]: `c` does not live long enough
|
||
|
--> $DIR/adt-nullary-enums.rs:43:45
|
||
|
|
|
||
|
LL | combine(SomeEnum::SomeVariant(Cell::new(&c)), SomeEnum::SomeOtherVariant::<Cell<&'static u32>>); //~ ERROR
|
||
|
| ^^ borrowed value does not live long enough
|
||
|
LL | }
|
||
|
| - `c` dropped here while still borrowed
|
||
|
|
|
||
|
= note: borrowed value must be valid for the static lifetime...
|
||
|
|
||
|
error[E0597]: `c` does not live long enough
|
||
|
--> $DIR/adt-nullary-enums.rs:48:45
|
||
|
|
|
||
|
LL | combine(SomeEnum::SomeVariant(Cell::new(&c)), SomeEnum::SomeOtherVariant::<Cell<&'a u32>>); //~ ERROR
|
||
|
| ^^ borrowed value does not live long enough
|
||
|
LL | }
|
||
|
| - `c` dropped here while still borrowed
|
||
|
|
|
||
|
note: borrowed value must be valid for the lifetime 'a as defined on the function body at 46:35...
|
||
|
--> $DIR/adt-nullary-enums.rs:46:35
|
||
|
|
|
||
|
LL | fn annot_reference_named_lifetime<'a>(_d: &'a u32) {
|
||
|
| ^^
|
||
|
|
||
|
error[E0597]: `c` does not live long enough
|
||
|
--> $DIR/adt-nullary-enums.rs:58:49
|
||
|
|
|
||
|
LL | combine(SomeEnum::SomeVariant(Cell::new(&c)), SomeEnum::SomeOtherVariant::<Cell<&'a u32>>); //~ ERROR
|
||
|
| ^^ borrowed value does not live long enough
|
||
|
LL | };
|
||
|
| - `c` dropped here while still borrowed
|
||
|
|
|
||
|
note: borrowed value must be valid for the lifetime 'a as defined on the function body at 55:46...
|
||
|
--> $DIR/adt-nullary-enums.rs:55:46
|
||
|
|
|
||
|
LL | fn annot_reference_named_lifetime_in_closure<'a>(_: &'a u32) {
|
||
|
| ^^
|
||
|
|
||
|
error: aborting due to 3 previous errors
|
||
|
|
||
|
For more information about this error, try `rustc --explain E0597`.
|