skip to content
tlam://snippet
cd ..

Overthinking

The compiler won't let me move on either.

overthinking.rs · 9 lines · rust
fn main() {    let thing_i_said = String::from("that weird thing at dinner in 2014");    let replay = &thing_i_said; // borrowed. indefinitely.    move_on(thing_i_said);    // error[E0505]: cannot move out of `thing_i_said` because it is borrowed    replay_at_3am(replay);}

replies (0)

login to reply.

// no replies yet