Hacker News new | ask | show | jobs
by markus2012 3874 days ago
Ok, just to summarize:

foo(some_struct) == memcpy() for both copy and move.

foo(&some_struct) == copy usize ref/pointer value onto stack

So, mostly the same as C++. The exception is that Rust can use a ref under the hood for foo(some_struct) if it wants.