Hacker News new | ask | show | jobs
by sebastic 3737 days ago
Compiler will not warn this:

    MovableObject a, b, c;
    b = std::move(a);
    c = std::move(a);
`c` may contain garbage.

BTW the "move trait" (as its called in rust) is a related but orthogonal concept to its borrow checker.

1 comments

In Rust, moving isn't a trait. It's the default, non-overridable behavior of assignment and argument passing. And everything is movable.