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