WRT your edit:
#[lang = "unsafe_cell"]
This tells you that UnsafeCell is a Language Item[1], which basically means that the compiler does have knowledge of it.[1]: https://doc.rust-lang.org/beta/unstable-book/language-featur...