We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 204805a + 602401c commit 9ac07edCopy full SHA for 9ac07ed
library/core/src/marker.rs
@@ -817,6 +817,13 @@ pub trait DiscriminantKind {
817
/// This can be used to declare that a constant with a generic type
818
/// will not contain interior mutability, and subsequently allow
819
/// 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.
827
#[lang = "freeze"]
828
#[unstable(feature = "freeze", issue = "121675")]
829
pub unsafe auto trait Freeze {}
0 commit comments