Skip to content

Commit

Permalink
Merge pull request #3809 from octavioooooo/patch-1
Browse files Browse the repository at this point in the history
Rephrase for clarity
  • Loading branch information
chriskrycho authored Nov 27, 2024
2 parents 66db452 + 52b9e2a commit fb46a07
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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); // because 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.
Expand Down

0 comments on commit fb46a07

Please sign in to comment.