3 ms·
You need to seriously read more on Rust before making judgments. You're clearly confused. What '2 is Copy' means precisely that Rust WILL NOT 'introduce pointe
by AsyncAwait 6y ago
You need to seriously read more on Rust before making judgments. You're clearly confused.
What '2 is Copy' means precisely that Rust WILL NOT 'introduce pointers where they don't need to be' - 2 is fine to 'alias' because it's a primitive type and so a copy is made when you do that, (i.e. the type implements the 'Copy' trait). However when you do that with complex types that do not implement Copy, you're moving ownership to the new variable so cannot use the old one any more.