1
Fork 0
rust/src/test/ui/consts/const-int-rotate.stderr

25 lines
917 B
Text
Raw Normal View History

2018-09-01 15:05:55 +02:00
error[E0597]: borrowed value does not live long enough
2018-12-25 08:56:47 -07:00
--> $DIR/const-int-rotate.rs:2:28
2018-09-01 15:05:55 +02:00
|
2019-03-09 15:03:44 +03:00
LL | let x: &'static i32 = &(5_i32.rotate_left(3));
2018-09-01 15:05:55 +02:00
| ^^^^^^^^^^^^^^^^^^^^^^ temporary value does not live long enough
2019-03-09 15:03:44 +03:00
LL | let y: &'static i32 = &(5_i32.rotate_right(3));
2018-09-01 15:05:55 +02: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-12-25 08:56:47 -07:00
--> $DIR/const-int-rotate.rs:3:28
2018-09-01 15:05:55 +02:00
|
2019-03-09 15:03:44 +03:00
LL | let y: &'static i32 = &(5_i32.rotate_right(3));
2018-09-01 15:05:55 +02: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 2 previous errors
For more information about this error, try `rustc --explain E0597`.