We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
This code does a use-after-free:
fn main() { let msg; match some(~"Hello") { some(ref m) => { msg = m; }, none => { fail } } io::println(*msg); }
Should it not compile? Or should liveness/borrowck ensure that the string live as long as the escaped reference?