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
This playpen code snippet now fails in compile : playpen
with error
<anon>:23:26: 23:46 error: `long_enough_lifetime` does not live long enough
<anon>:23 handle.set_data(&long_enough_lifetime); // This is OK
^~~~~~~~~~~~~~~~~~~~
<anon>:17:34: 27:2 note: reference must be valid for the block suffix following statement 0 at 17:33...
But if you just swap the following 2 lines, line 17 with line 18, it compiles fine.
let long_enough_lifetime = DropCanary{label:"long"};letmut handle = Handle(None);