File tree Expand file tree Collapse file tree 3 files changed +5
-2
lines changed Expand file tree Collapse file tree 3 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 22
33use crate :: fmt;
44use crate :: hash:: { Hash , Hasher } ;
5+ use crate :: marker:: Freeze ;
56
67/// Provides the pointer metadata type of any pointed-to type.
78///
@@ -57,7 +58,7 @@ pub trait Pointee {
5758 // NOTE: Keep trait bounds in `static_assert_expected_bounds_for_metadata`
5859 // in `library/core/src/ptr/metadata.rs`
5960 // in sync with those here:
60- type Metadata : Copy + Send + Sync + Ord + Hash + Unpin ;
61+ type Metadata : Copy + Send + Sync + Ord + Hash + Unpin + Freeze ;
6162}
6263
6364/// Pointers to types implementing this trait alias are “thin”.
Original file line number Diff line number Diff line change 3636#![ feature( duration_constructors) ]
3737#![ feature( exact_size_is_empty) ]
3838#![ feature( extern_types) ]
39+ #![ feature( freeze) ]
3940#![ feature( flt2dec) ]
4041#![ feature( fmt_internals) ]
4142#![ feature( float_minimum_maximum) ]
Original file line number Diff line number Diff line change 11use core:: cell:: RefCell ;
2+ use core:: marker:: Freeze ;
23use core:: mem:: { self , MaybeUninit } ;
34use core:: num:: NonZero ;
45use core:: ptr;
@@ -841,7 +842,7 @@ fn ptr_metadata_bounds() {
841842 fn static_assert_expected_bounds_for_metadata < Meta > ( )
842843 where
843844 // Keep this in sync with the associated type in `library/core/src/ptr/metadata.rs`
844- Meta : Copy + Send + Sync + Ord + std:: hash:: Hash + Unpin ,
845+ Meta : Copy + Send + Sync + Ord + std:: hash:: Hash + Unpin + Freeze ,
845846 {
846847 }
847848}
You can’t perform that action at this time.
0 commit comments