Skip to content

Commit 9ac07ed

Browse files
authored
Unrolled build for rust-lang#123268
Rollup merge of rust-lang#123268 - RalfJung:dont-freeze, r=Nilstrieb warn against implementing Freeze As [requested](rust-lang#123184 (comment)) by `@workingjubilee`
2 parents 204805a + 602401c commit 9ac07ed

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

library/core/src/marker.rs

+7
Original file line numberDiff line numberDiff line change
@@ -817,6 +817,13 @@ pub trait DiscriminantKind {
817817
/// This can be used to declare that a constant with a generic type
818818
/// will not contain interior mutability, and subsequently allow
819819
/// placing the constant behind references.
820+
///
821+
/// # Safety
822+
///
823+
/// This trait is a core part of the language, it is just expressed as a trait in libcore for
824+
/// convenience. Do *not* implement it for other types.
825+
// FIXME: Eventually this trait should become `#[rustc_deny_explicit_impl]`.
826+
// That requires porting the impls below to native internal impls.
820827
#[lang = "freeze"]
821828
#[unstable(feature = "freeze", issue = "121675")]
822829
pub unsafe auto trait Freeze {}

0 commit comments

Comments
 (0)