You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error[E0597]: `x` does not live long enough (Ast)
--> foo.rs:4:6
|
4 | &x
| ^ does not live long enough
5 | }
| - borrowed value only lives until here
|
= note: borrowed value must be valid for the static lifetime...
error[E0597]: borrowed value does not live long enough (Mir)
--> foo.rs:5:2
|
3 | let x = 0;
| - temporary value created here
4 | &x
5 | }
| -^ temporary value dropped here while still borrowed
| |
| temporary value needs to live until here
|
= note: consider using a `let` binding to increase its lifetime
error: aborting due to 2 previous errors
The MIR error message should be more like the AST one
The text was updated successfully, but these errors were encountered:
e.g.:
Gives the following error:
The MIR error message should be more like the AST one
The text was updated successfully, but these errors were encountered: