error[E0382]: use of moved value: `s` --> src/main.rs:4:18 | 2 | let s = String::from("Hello π"); | - move occurs because `s` has type `String`, which does not implement the `Copy` trait 3 | print_string(s); | - value moved here 4 | print_string(s); | ^ value used here after move | note: consider changing this parameter type in function `print_string` to borrow instead if owning the value isn't necessary --> src/main.rs:7:20 | 7 | fn print_string(s: String) { | ------------ ^^^^^^ this parameter takes ownership of the value | | | in this function help: consider cloning the value if the performance cost is acceptable | 3 | print_string(s.clone()); | ++++++++ For more information about this error, try `rustc --explain E0382`.