Skip to content

Commit

Permalink
Unrolled build for rust-lang#123268
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#123268 - RalfJung:dont-freeze, r=Nilstrieb

warn against implementing Freeze

As [requested](rust-lang#123184 (comment)) by `@workingjubilee`
  • Loading branch information
rust-timer committed Mar 31, 2024
2 parents 204805a + 602401c commit 9ac07ed
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions library/core/src/marker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -817,6 +817,13 @@ pub trait DiscriminantKind {
/// This can be used to declare that a constant with a generic type
/// will not contain interior mutability, and subsequently allow
/// placing the constant behind references.
///
/// # Safety
///
/// This trait is a core part of the language, it is just expressed as a trait in libcore for
/// convenience. Do *not* implement it for other types.
// FIXME: Eventually this trait should become `#[rustc_deny_explicit_impl]`.
// That requires porting the impls below to native internal impls.
#[lang = "freeze"]
#[unstable(feature = "freeze", issue = "121675")]
pub unsafe auto trait Freeze {}
Expand Down

0 comments on commit 9ac07ed

Please sign in to comment.