Beginner Rust
Q4 / 100

What is a move in Rust?

Correct! Well done.

Incorrect.

The correct answer is B) Transferring ownership of a value to another variable, making the original variable invalid

B

Correct Answer

Transferring ownership of a value to another variable, making the original variable invalid

Explanation

let s1 = String::from("hello"); let s2 = s1; — s1 is moved into s2. Using s1 after this is a compile error.

Progress
4/100