File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -810,15 +810,21 @@ pub trait DiscriminantKind {
810
810
type Discriminant : Clone + Copy + Debug + Eq + PartialEq + Hash + Send + Sync + Unpin ;
811
811
}
812
812
813
- /// Compiler-internal trait used to determine whether a type contains
813
+ /// Used to determine whether a type contains
814
814
/// any `UnsafeCell` internally, but not through an indirection.
815
815
/// This affects, for example, whether a `static` of that type is
816
816
/// placed in read-only static memory or writable static memory.
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.
817
820
#[ lang = "freeze" ]
818
- pub ( crate ) unsafe auto trait Freeze { }
821
+ #[ unstable( feature = "freeze" , issue = "60715" ) ]
822
+ pub unsafe auto trait Freeze { }
819
823
824
+ #[ unstable( feature = "freeze" , issue = "60715" ) ]
820
825
impl < T : ?Sized > !Freeze for UnsafeCell < T > { }
821
826
marker_impls ! {
827
+ #[ unstable( feature = "freeze" , issue = "60715" ) ]
822
828
unsafe Freeze for
823
829
{ T : ?Sized } PhantomData <T >,
824
830
{ T : ?Sized } * const T ,
You can’t perform that action at this time.
0 commit comments