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
From @nikomatsakis (based on a chat with @wycats) - we can further improve the "doesn't live long enough" error by talking a bit more about how the values flow through the error. Something like:
error: `x` does not live long enough
--> <anon>:4:10
|
4 | p = &x;
| - borrow occurs here
5 | }
| ^ `x` dropped here while still borrowed
|
= note: values in a scope are dropped in the opposite order they are created