Skip to main content
Journey Uncommon Logo
JourneyUncommon
easyRustownership and moveSingle-choice MCQ

What happens when you pass a `String` by value to a function that takes `String`, then try to use the original variable afterward?

fn takes(s: String) -> usize { s.len() } fn main() { let s = String::from("hello"); let n = takes(s); println!("{} {}", s, n); }