Compare commits

...

2 Commits

Author SHA1 Message Date
octavio 6ab25d7ff1
Merge 521fb1cd68 into d207d894cc 2024-04-24 13:33:33 +05:30
octavio telles teichner 521fb1cd68
Rephrase for clarity 2024-01-08 16:46:37 -03:00
1 changed files with 3 additions and 3 deletions

View File

@ -6,9 +6,9 @@ fn main() {
let x = 5; // x comes into scope
makes_copy(x); // x would move into the function,
// but i32 is Copy, so it's okay to still
// use x afterward
makes_copy(x); // since i32 implements the Copy trait,
// x does NOT move into the function,
println!("{}", x); // so it's okay to use x afterward
} // Here, x goes out of scope, then s. But because s's value was moved, nothing
// special happens.