Constify Drop and Destruct
This commit is contained in:
@@ -957,6 +957,7 @@ marker_impls! {
|
||||
#[lang = "destruct"]
|
||||
#[rustc_on_unimplemented(message = "can't drop `{Self}`", append_const_msg)]
|
||||
#[rustc_deny_explicit_impl(implement_via_object = false)]
|
||||
#[cfg_attr(not(bootstrap), const_trait)]
|
||||
pub trait Destruct {}
|
||||
|
||||
/// A marker for tuple types.
|
||||
|
||||
@@ -203,7 +203,7 @@
|
||||
/// [nomicon]: ../../nomicon/phantom-data.html#an-exception-the-special-case-of-the-standard-library-and-its-unstable-may_dangle
|
||||
#[lang = "drop"]
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
// FIXME(const_trait_impl) #[const_trait]
|
||||
#[cfg_attr(not(bootstrap), const_trait)]
|
||||
pub trait Drop {
|
||||
/// Executes the destructor for this type.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user