Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Well no, some objects (notably Cell<>) require Copy, because clone(&self) takes a reference and can do arbitrary things with the Cell (including overwriting the data its ref points to via Cell::set())


I suppose you'd need a Copy-like auto trait to serve as a bound on impl Clone for Cell<T>. It wouldn't have to be magical the way Copy is, though.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: