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