Introduce language items for Arc
and Rc
.
This commit introduces language items for `Arc` and `Rc` so that types can later be checked to be `Arc` or `Rc` in the NLL borrow checker. The `lang` attribute is currently limited to `stage1` as it requires a compiler built with knowledge of the expected language items.
This commit is contained in:
parent
1886d5fe1c
commit
da4a12038b
6 changed files with 44 additions and 1 deletions
|
@ -199,6 +199,7 @@ const MAX_REFCOUNT: usize = (isize::MAX) as usize;
|
|||
/// counting in general.
|
||||
///
|
||||
/// [rc_examples]: ../../std/rc/index.html#examples
|
||||
#[cfg_attr(all(not(stage0), not(test)), lang = "arc")]
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub struct Arc<T: ?Sized> {
|
||||
ptr: NonNull<ArcInner<T>>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue