Hacker News new | past | comments | ask | show | jobs | submit login

> Copy is a trait that is automatically implemented by the compiler (and cannot be manually overridden) that basically just says "semantically this type can be copied with memcpy", it doesn't actually control the runtime behaviour of =. (The phrasing in that section isn't as clear as it could be.)

That's a very good news. Indeed that section is not clear, it looks like user defined classes could implement the copy trait, which would be really bad.

Thanks for your answers.




(BTW, I edited some more details about copy vs. move into my previous comment just after you replied.)




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: