Hacker News new | ask | show | jobs
by jrvidal 2305 days ago
I'm not sure that's correct. `UnsafeCell` is a Rust lang item that might disable some optimizations, I think?

https://doc.rust-lang.org/src/core/cell.rs.html#1483

2 comments

You're right, I just saw that. Well I least I learned something new about Rust today!
Yep, you can't implement UnsafeCell yourself without running into undefined behavior.