@@ -838,7 +838,6 @@ pub type BuiltinBounds = EnumSet<BuiltinBound>;
838
838
pub enum BuiltinBound {
839
839
BoundStatic ,
840
840
BoundSend ,
841
- BoundFreeze ,
842
841
BoundSized ,
843
842
BoundPod ,
844
843
BoundShare ,
@@ -852,7 +851,6 @@ pub fn AllBuiltinBounds() -> BuiltinBounds {
852
851
let mut set = EnumSet :: empty ( ) ;
853
852
set. add ( BoundStatic ) ;
854
853
set. add ( BoundSend ) ;
855
- set. add ( BoundFreeze ) ;
856
854
set. add ( BoundSized ) ;
857
855
set. add ( BoundShare ) ;
858
856
set
@@ -1892,9 +1890,6 @@ def_type_content_sets!(
1892
1890
// that it neither reaches nor owns a managed pointer.
1893
1891
Nonsendable = 0b0000_0111__0000_0100__0000 ,
1894
1892
1895
- // Things that prevent values from being considered freezable
1896
- Nonfreezable = 0b0000_1000__0000_0000__0000 ,
1897
-
1898
1893
// Things that prevent values from being considered 'static
1899
1894
Nonstatic = 0b0000_0010__0000_0000__0000 ,
1900
1895
@@ -1929,7 +1924,6 @@ impl TypeContents {
1929
1924
pub fn meets_bound ( & self , cx : & ctxt , bb : BuiltinBound ) -> bool {
1930
1925
match bb {
1931
1926
BoundStatic => self . is_static ( cx) ,
1932
- BoundFreeze => self . is_freezable ( cx) ,
1933
1927
BoundSend => self . is_sendable ( cx) ,
1934
1928
BoundSized => self . is_sized ( cx) ,
1935
1929
BoundPod => self . is_pod ( cx) ,
@@ -1965,10 +1959,6 @@ impl TypeContents {
1965
1959
self . intersects ( TC :: OwnsOwned )
1966
1960
}
1967
1961
1968
- pub fn is_freezable ( & self , _: & ctxt ) -> bool {
1969
- !self . intersects ( TC :: Nonfreezable )
1970
- }
1971
-
1972
1962
pub fn is_sized ( & self , _: & ctxt ) -> bool {
1973
1963
!self . intersects ( TC :: Nonsized )
1974
1964
}
@@ -2073,10 +2063,6 @@ pub fn type_is_sendable(cx: &ctxt, t: ty::t) -> bool {
2073
2063
type_contents ( cx, t) . is_sendable ( cx)
2074
2064
}
2075
2065
2076
- pub fn type_is_freezable ( cx : & ctxt , t : ty:: t ) -> bool {
2077
- type_contents ( cx, t) . is_freezable ( cx)
2078
- }
2079
-
2080
2066
pub fn type_interior_is_unsafe ( cx : & ctxt , t : ty:: t ) -> bool {
2081
2067
type_contents ( cx, t) . interior_unsafe ( )
2082
2068
}
@@ -2132,7 +2118,7 @@ pub fn type_contents(cx: &ctxt, ty: t) -> TypeContents {
2132
2118
cache. insert ( ty_id, TC :: None ) ;
2133
2119
2134
2120
let result = match get ( ty) . sty {
2135
- // Scalar and unique types are sendable, freezable, and durable
2121
+ // Scalar and unique types are sendable, and durable
2136
2122
ty_nil | ty_bot | ty_bool | ty_int( _) | ty_uint( _) | ty_float( _) |
2137
2123
ty_bare_fn( _) | ty:: ty_char => {
2138
2124
TC :: None
@@ -2270,9 +2256,7 @@ pub fn type_contents(cx: &ctxt, ty: t) -> TypeContents {
2270
2256
did : ast:: DefId ,
2271
2257
tc : TypeContents )
2272
2258
-> TypeContents {
2273
- if Some ( did) == cx. lang_items . no_freeze_bound ( ) {
2274
- tc | TC :: ReachesMutable
2275
- } else if Some ( did) == cx. lang_items . no_send_bound ( ) {
2259
+ if Some ( did) == cx. lang_items . no_send_bound ( ) {
2276
2260
tc | TC :: ReachesNonsendAnnot
2277
2261
} else if Some ( did) == cx. lang_items . managed_bound ( ) {
2278
2262
tc | TC :: Managed
@@ -2357,7 +2341,6 @@ pub fn type_contents(cx: &ctxt, ty: t) -> TypeContents {
2357
2341
tc = tc - match bound {
2358
2342
BoundStatic => TC :: Nonstatic ,
2359
2343
BoundSend => TC :: Nonsendable ,
2360
- BoundFreeze => TC :: Nonfreezable ,
2361
2344
BoundSized => TC :: Nonsized ,
2362
2345
BoundPod => TC :: Nonpod ,
2363
2346
BoundShare => TC :: Nonsharable ,
0 commit comments