Add Destructible
for replacing ~const Drop
This commit is contained in:
parent
051d1176b7
commit
4df2a28aee
3 changed files with 9 additions and 0 deletions
|
@ -216,6 +216,7 @@ language_item_table! {
|
||||||
Freeze, sym::freeze, freeze_trait, Target::Trait, GenericRequirement::Exact(0);
|
Freeze, sym::freeze, freeze_trait, Target::Trait, GenericRequirement::Exact(0);
|
||||||
|
|
||||||
Drop, sym::drop, drop_trait, Target::Trait, GenericRequirement::None;
|
Drop, sym::drop, drop_trait, Target::Trait, GenericRequirement::None;
|
||||||
|
Destructible, sym::destructible, destructible_trait, Target::Trait, GenericRequirement::None;
|
||||||
|
|
||||||
CoerceUnsized, sym::coerce_unsized, coerce_unsized_trait, Target::Trait, GenericRequirement::Minimum(1);
|
CoerceUnsized, sym::coerce_unsized, coerce_unsized_trait, Target::Trait, GenericRequirement::Minimum(1);
|
||||||
DispatchFromDyn, sym::dispatch_from_dyn, dispatch_from_dyn_trait, Target::Trait, GenericRequirement::Minimum(1);
|
DispatchFromDyn, sym::dispatch_from_dyn, dispatch_from_dyn_trait, Target::Trait, GenericRequirement::Minimum(1);
|
||||||
|
|
|
@ -571,6 +571,7 @@ symbols! {
|
||||||
deref_target,
|
deref_target,
|
||||||
derive,
|
derive,
|
||||||
derive_default_enum,
|
derive_default_enum,
|
||||||
|
destructible,
|
||||||
destructuring_assignment,
|
destructuring_assignment,
|
||||||
diagnostic,
|
diagnostic,
|
||||||
direct,
|
direct,
|
||||||
|
|
|
@ -792,6 +792,13 @@ impl<T: ?Sized> Unpin for *const T {}
|
||||||
#[stable(feature = "pin_raw", since = "1.38.0")]
|
#[stable(feature = "pin_raw", since = "1.38.0")]
|
||||||
impl<T: ?Sized> Unpin for *mut T {}
|
impl<T: ?Sized> Unpin for *mut T {}
|
||||||
|
|
||||||
|
/// A marker for types that can be dropped.
|
||||||
|
///
|
||||||
|
/// The compiler logic for this trait is currently unimplemented.
|
||||||
|
#[unstable(feature = "const_trait_impl", issue = "67792")]
|
||||||
|
#[cfg_attr(not(bootstrap), lang = "destructible")]
|
||||||
|
pub trait Destructible {}
|
||||||
|
|
||||||
/// Implementations of `Copy` for primitive types.
|
/// Implementations of `Copy` for primitive types.
|
||||||
///
|
///
|
||||||
/// Implementations that cannot be described in Rust
|
/// Implementations that cannot be described in Rust
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue