- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.9k
Closed
Labels
A-frontendArea: Compiler frontend (errors, parsing and HIR)Area: Compiler frontend (errors, parsing and HIR)
Description
This is needed to wrap external libraries with reference counted but not inherently thread-safe types, and could be used to implemented a reference counted pointer as a library feature. It prevents the type from being sendable, and it could only allow Owned types to be contained in it, preventing cycles from ever occurring.
The #[non_const] attribute is needed to make Cell safe if we were using llvm.invariant intrinsics on frozen Const types, and for mutable reference counted pointers.
For now I've worked around the issue for reference counted pointers by making them contain Option<@()> and Option<@mut ()> and just setting those to None.
Metadata
Metadata
Assignees
Labels
A-frontendArea: Compiler frontend (errors, parsing and HIR)Area: Compiler frontend (errors, parsing and HIR)