Skip to content

Commit ef0c227

Browse files
compiler-errorsgitbot
authored and
gitbot
committed
Constify Drop and Destruct
1 parent f94853d commit ef0c227

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

core/src/marker.rs

+1
Original file line numberDiff line numberDiff line change
@@ -957,6 +957,7 @@ marker_impls! {
957957
#[lang = "destruct"]
958958
#[rustc_on_unimplemented(message = "can't drop `{Self}`", append_const_msg)]
959959
#[rustc_deny_explicit_impl(implement_via_object = false)]
960+
#[cfg_attr(not(bootstrap), const_trait)]
960961
pub trait Destruct {}
961962

962963
/// A marker for tuple types.

core/src/ops/drop.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@
203203
/// [nomicon]: ../../nomicon/phantom-data.html#an-exception-the-special-case-of-the-standard-library-and-its-unstable-may_dangle
204204
#[lang = "drop"]
205205
#[stable(feature = "rust1", since = "1.0.0")]
206-
// FIXME(const_trait_impl) #[const_trait]
206+
#[cfg_attr(not(bootstrap), const_trait)]
207207
pub trait Drop {
208208
/// Executes the destructor for this type.
209209
///

0 commit comments

Comments
 (0)