File tree 3 files changed +5
-2
lines changed
3 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 2
2
3
3
use crate :: fmt;
4
4
use crate :: hash:: { Hash , Hasher } ;
5
+ use crate :: marker:: Freeze ;
5
6
6
7
/// Provides the pointer metadata type of any pointed-to type.
7
8
///
@@ -57,7 +58,7 @@ pub trait Pointee {
57
58
// NOTE: Keep trait bounds in `static_assert_expected_bounds_for_metadata`
58
59
// in `library/core/src/ptr/metadata.rs`
59
60
// in sync with those here:
60
- type Metadata : Copy + Send + Sync + Ord + Hash + Unpin ;
61
+ type Metadata : Copy + Send + Sync + Ord + Hash + Unpin + Freeze ;
61
62
}
62
63
63
64
/// Pointers to types implementing this trait alias are “thin”.
Original file line number Diff line number Diff line change 36
36
#![ feature( duration_constructors) ]
37
37
#![ feature( exact_size_is_empty) ]
38
38
#![ feature( extern_types) ]
39
+ #![ feature( freeze) ]
39
40
#![ feature( flt2dec) ]
40
41
#![ feature( fmt_internals) ]
41
42
#![ feature( float_minimum_maximum) ]
Original file line number Diff line number Diff line change 1
1
use core:: cell:: RefCell ;
2
+ use core:: marker:: Freeze ;
2
3
use core:: mem:: { self , MaybeUninit } ;
3
4
use core:: num:: NonZero ;
4
5
use core:: ptr;
@@ -841,7 +842,7 @@ fn ptr_metadata_bounds() {
841
842
fn static_assert_expected_bounds_for_metadata < Meta > ( )
842
843
where
843
844
// 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 ,
845
846
{
846
847
}
847
848
}
You can’t perform that action at this time.
0 commit comments