Rename ~const Drop to ~const Destruct

This commit is contained in:
Deadbeef
2022-03-21 16:52:41 +11:00
parent 4df2a28aee
commit 1f3ee7f32e
32 changed files with 296 additions and 192 deletions

View File

@@ -794,10 +794,19 @@ impl<T: ?Sized> Unpin for *mut T {}
/// A marker for types that can be dropped.
///
/// The compiler logic for this trait is currently unimplemented.
/// This should be used for `~const` bounds,
/// as non-const bounds will always hold for every type.
#[unstable(feature = "const_trait_impl", issue = "67792")]
#[cfg_attr(not(bootstrap), lang = "destructible")]
pub trait Destructible {}
#[cfg_attr(not(bootstrap), lang = "destruct")]
#[cfg_attr(
not(bootstrap),
rustc_on_unimplemented(message = "can't drop `{Self}`", append_const_msg,)
)]
pub trait Destruct {}
#[cfg(bootstrap)]
#[unstable(feature = "const_trait_impl", issue = "67792")]
impl<T: ?Sized> const Destruct for T {}
/// Implementations of `Copy` for primitive types.
///