| error[E0597]: `x` does not live long enough (Ast) |
| --> $DIR/issue-46471.rs:15:6 |
| | |
| LL | &x |
| | ^ borrowed value does not live long enough |
| ... |
| LL | } |
| | - borrowed value only lives until here |
| | |
| = note: borrowed value must be valid for the static lifetime... |
| |
| error[E0515]: cannot return reference to local variable `x` (Mir) |
| --> $DIR/issue-46471.rs:15:5 |
| | |
| LL | &x |
| | ^^ returns a reference to data owned by the current function |
| |
| error: aborting due to 2 previous errors |
| |
| Some errors occurred: E0515, E0597. |
| For more information about an error, try `rustc --explain E0515`. |