3 ms·
> the use-after-move checks aren't bugprone in Rust I can't tell if one if us is confused here or if this is just confusing wording, but the check I referred t
by dataflow 3y ago
> the use-after-move checks aren't bugprone in Rust
I can't tell if one if us is confused here or if this is just confusing wording, but the check I referred to is not bug-prone. The pattern of using something after it's been moved from is bug-prone (even though it'd work fine for things like integers, in either language), and it's checking for that bug-prone pattern, hence the name.
- db48x 3y agoIn Rust it’s not bug–prone. The compiler knows which types are moved and which are copied, and if you write code that uses something after it was moved you get a compile–time error.