Hacker News new | ask | show | jobs
by steveklabnik 3873 days ago
You're mis-understanding.

  > Rust will ALWAYS memcpy() the params.
Right. This is "pass value by reference." The reference itself, the pointer, gets copied. Not what it points to.

  > Does Rust do this?
Rust's ABI is undefined, so officially, it doesn't do anything. That said, currently, it will take larger items and pass a pointer instead, if it makes sense to do so.