2018-08-31 06:50:14 -05:00
|
|
|
error[E0597]: borrowed value does not live long enough
|
2018-10-05 03:17:16 -05:00
|
|
|
--> $DIR/promotion.rs:11:27
|
2018-08-31 06:50:14 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | let x: &'static () = &foo1();
|
2018-08-31 06:50:14 -05:00
|
|
|
| ^^^^^^ temporary value does not live long enough
|
|
|
|
...
|
|
|
|
LL | }
|
|
|
|
| - temporary value only lives until here
|
|
|
|
|
|
|
|
|
= note: borrowed value must be valid for the static lifetime...
|
|
|
|
|
|
|
|
error[E0597]: borrowed value does not live long enough
|
2018-10-05 03:17:16 -05:00
|
|
|
--> $DIR/promotion.rs:12:28
|
2018-08-31 06:50:14 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | let y: &'static i32 = &foo2(42);
|
2018-08-31 06:50:14 -05:00
|
|
|
| ^^^^^^^^ temporary value does not live long enough
|
|
|
|
...
|
|
|
|
LL | }
|
|
|
|
| - temporary value only lives until here
|
|
|
|
|
|
|
|
|
= note: borrowed value must be valid for the static lifetime...
|
|
|
|
|
|
|
|
error[E0597]: borrowed value does not live long enough
|
2018-10-05 03:17:16 -05:00
|
|
|
--> $DIR/promotion.rs:13:28
|
2018-08-31 06:50:14 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | let z: &'static i32 = &foo3();
|
2018-08-31 06:50:14 -05:00
|
|
|
| ^^^^^^ temporary value does not live long enough
|
|
|
|
...
|
|
|
|
LL | }
|
|
|
|
| - temporary value only lives until here
|
|
|
|
|
|
|
|
|
= note: borrowed value must be valid for the static lifetime...
|
|
|
|
|
|
|
|
error[E0597]: borrowed value does not live long enough
|
2018-10-05 03:17:16 -05:00
|
|
|
--> $DIR/promotion.rs:14:34
|
2018-08-31 06:50:14 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | let a: &'static Cell<i32> = &foo4();
|
2018-08-31 06:50:14 -05:00
|
|
|
| ^^^^^^ temporary value does not live long enough
|
|
|
|
...
|
|
|
|
LL | }
|
|
|
|
| - temporary value only lives until here
|
|
|
|
|
|
|
|
|
= note: borrowed value must be valid for the static lifetime...
|
|
|
|
|
|
|
|
error[E0597]: borrowed value does not live long enough
|
2018-10-05 03:17:16 -05:00
|
|
|
--> $DIR/promotion.rs:15:42
|
2018-08-31 06:50:14 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | let a: &'static Option<Cell<i32>> = &foo5();
|
2018-08-31 06:50:14 -05:00
|
|
|
| ^^^^^^ temporary value does not live long enough
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | let a: &'static Option<Cell<i32>> = &foo6();
|
2018-08-31 06:50:14 -05:00
|
|
|
LL | }
|
|
|
|
| - temporary value only lives until here
|
|
|
|
|
|
|
|
|
= note: borrowed value must be valid for the static lifetime...
|
|
|
|
|
|
|
|
error[E0597]: borrowed value does not live long enough
|
2018-10-05 03:17:16 -05:00
|
|
|
--> $DIR/promotion.rs:16:42
|
2018-08-31 06:50:14 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | let a: &'static Option<Cell<i32>> = &foo6();
|
2018-08-31 06:50:14 -05:00
|
|
|
| ^^^^^^ temporary value does not live long enough
|
|
|
|
LL | }
|
|
|
|
| - temporary value only lives until here
|
|
|
|
|
|
|
|
|
= note: borrowed value must be valid for the static lifetime...
|
|
|
|
|
|
|
|
error: aborting due to 6 previous errors
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0597`.
|