Whose Error Is It?

Rust printed this

error[E0382]: borrow of moved value: `s`
What it meansThe value s was moved into another variable or function, so its ownership is gone and the original binding cannot be used anymore.
The first thing to checkPass a reference like &s instead of s, or call s.clone() if you truly need two owned copies; check the line the compiler marks as the move.
The walrus saysThe borrow checker remembers everything you moved.

More from Rust

All 75 errors

Whose Error Is It? · Status Menu · Back to the bar