2017-12-10 17:00:20 +00:00
|
|
|
error[E0597]: borrowed value does not live long enough (Ast)
|
|
|
|
--> $DIR/issue-46472.rs:14:10
|
|
|
|
|
|
|
|
|
14 | &mut 4
|
2017-12-14 01:27:23 +00:00
|
|
|
| ^ temporary value does not live long enough
|
2017-12-10 17:00:20 +00:00
|
|
|
...
|
|
|
|
17 | }
|
|
|
|
| - temporary value only lives until here
|
|
|
|
|
|
|
|
|
note: borrowed value must be valid for the lifetime 'a as defined on the function body at 13:1...
|
|
|
|
--> $DIR/issue-46472.rs:13:1
|
|
|
|
|
|
2018-01-28 21:42:49 +00:00
|
|
|
13 | fn bar<'a>() -> &'a mut u32 {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2017-12-10 17:00:20 +00:00
|
|
|
|
|
|
|
error[E0597]: borrowed value does not live long enough (Mir)
|
|
|
|
--> $DIR/issue-46472.rs:14:10
|
|
|
|
|
|
|
|
|
14 | &mut 4
|
2017-12-14 17:57:34 +00:00
|
|
|
| ^ temporary value does not live long enough
|
2017-12-10 17:00:20 +00:00
|
|
|
...
|
|
|
|
17 | }
|
2018-01-13 23:28:00 +00:00
|
|
|
| - temporary value only lives until here
|
2017-12-10 17:00:20 +00:00
|
|
|
|
|
|
|
|
note: borrowed value must be valid for the lifetime 'a as defined on the function body at 13:1...
|
|
|
|
--> $DIR/issue-46472.rs:13:1
|
|
|
|
|
|
2018-01-28 21:42:49 +00:00
|
|
|
13 | fn bar<'a>() -> &'a mut u32 {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2017-12-10 17:00:20 +00:00
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|
2018-02-19 20:40:25 +00:00
|
|
|
If you want more information on this error, try using "rustc --explain E0597"
|