3 ms·
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
by Sean1708 7y ago
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-features/lang-items.html https://doc.rust-lang.org/beta/unstable-book/language-featur...
- estebank 7y agoThis annotation let's the compiler treat their items in special ways, but it is usually for either easier way to refer to them (I want to desugar this type to a cell of what I already have) or for diagnostics. I think box is one of the few "magical" things in the language.