1 error[E0597]: borrowed value does not live long enough (Ast)
2 --> $DIR/issue-46472.rs:14:10
5 | ^ temporary value does not live long enough
8 | - temporary value only lives until here
10 note: borrowed value must be valid for the lifetime 'a as defined on the function body at 13:8...
11 --> $DIR/issue-46472.rs:13:8
13 LL | fn bar<'a>() -> &'a mut u32 {
16 error[E0716]: temporary value dropped while borrowed (Mir)
17 --> $DIR/issue-46472.rs:14:10
20 | ^ creates a temporary which is freed while still in use
23 | - temporary value is freed at the end of this statement
25 note: borrowed value must be valid for the lifetime 'a as defined on the function body at 13:8...
26 --> $DIR/issue-46472.rs:13:8
28 LL | fn bar<'a>() -> &'a mut u32 {
31 error: aborting due to 2 previous errors
33 Some errors occurred: E0597, E0716.
34 For more information about an error, try `rustc --explain E0597`.