fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0597]: `c` does not live long enough 2 --> $DIR/adt-nullary-enums.rs:33:41 3 | 4LL | let c = 66; 5 | - binding `c` declared here 6LL | / combine( 7LL | | SomeEnum::SomeVariant(Cell::new(&c)), 8 | | ^^ borrowed value does not live long enough 9LL | | SomeEnum::SomeOtherVariant::<Cell<&'static u32>>, 10LL | | ); 11 | |_____- argument requires that `c` is borrowed for `'static` 12LL | } 13 | - `c` dropped here while still borrowed 14 15error[E0597]: `c` does not live long enough 16 --> $DIR/adt-nullary-enums.rs:41:41 17 | 18LL | fn annot_reference_named_lifetime<'a>(_d: &'a u32) { 19 | -- lifetime `'a` defined here 20LL | let c = 66; 21 | - binding `c` declared here 22LL | combine( 23LL | SomeEnum::SomeVariant(Cell::new(&c)), 24 | ----------^^- 25 | | | 26 | | borrowed value does not live long enough 27 | argument requires that `c` is borrowed for `'a` 28... 29LL | } 30 | - `c` dropped here while still borrowed 31 32error[E0597]: `c` does not live long enough 33 --> $DIR/adt-nullary-enums.rs:54:45 34 | 35LL | fn annot_reference_named_lifetime_in_closure<'a>(_: &'a u32) { 36 | -- lifetime `'a` defined here 37LL | let _closure = || { 38LL | let c = 66; 39 | - binding `c` declared here 40LL | combine( 41LL | SomeEnum::SomeVariant(Cell::new(&c)), 42 | ----------^^- 43 | | | 44 | | borrowed value does not live long enough 45 | argument requires that `c` is borrowed for `'a` 46... 47LL | }; 48 | - `c` dropped here while still borrowed 49 50error: aborting due to 3 previous errors 51 52For more information about this error, try `rustc --explain E0597`.