Skip to content

Commit

Permalink
Constify Drop and Destruct
Browse files Browse the repository at this point in the history
  • Loading branch information
compiler-errors authored and gitbot committed Feb 20, 2025
1 parent 9461af1 commit 3c99eaa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions core/src/marker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion core/src/ops/drop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
///
Expand Down

0 comments on commit 3c99eaa

Please sign in to comment.