Closed
Description
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
Activity