@@ -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
@@ -1902,9 +1900,6 @@ def_type_content_sets!(
1902
1900
// that it neither reaches nor owns a managed pointer.
1903
1901
Nonsendable = 0b0000_0111__0000_0100__0000 ,
1904
1902
1905
- // Things that prevent values from being considered freezable
1906
- Nonfreezable = 0b0000_1000__0000_0000__0000 ,
1907
-
1908
1903
// Things that prevent values from being considered 'static
1909
1904
Nonstatic = 0b0000_0010__0000_0000__0000 ,
1910
1905
@@ -1939,7 +1934,6 @@ impl TypeContents {
1939
1934
pub fn meets_bound ( & self , cx : & ctxt , bb : BuiltinBound ) -> bool {
1940
1935
match bb {
1941
1936
BoundStatic => self . is_static ( cx) ,
1942
- BoundFreeze => self . is_freezable ( cx) ,
1943
1937
BoundSend => self . is_sendable ( cx) ,
1944
1938
BoundSized => self . is_sized ( cx) ,
1945
1939
BoundPod => self . is_pod ( cx) ,
@@ -1975,10 +1969,6 @@ impl TypeContents {
1975
1969
self . intersects ( TC :: OwnsOwned )
1976
1970
}
1977
1971
1978
- pub fn is_freezable ( & self , _: & ctxt ) -> bool {
1979
- !self . intersects ( TC :: Nonfreezable )
1980
- }
1981
-
1982
1972
pub fn is_sized ( & self , _: & ctxt ) -> bool {
1983
1973
!self . intersects ( TC :: Nonsized )
1984
1974
}
@@ -2083,10 +2073,6 @@ pub fn type_is_sendable(cx: &ctxt, t: ty::t) -> bool {
2083
2073
type_contents ( cx, t) . is_sendable ( cx)
2084
2074
}
2085
2075
2086
- pub fn type_is_freezable ( cx : & ctxt , t : ty:: t ) -> bool {
2087
- type_contents ( cx, t) . is_freezable ( cx)
2088
- }
2089
-
2090
2076
pub fn type_interior_is_unsafe ( cx : & ctxt , t : ty:: t ) -> bool {
2091
2077
type_contents ( cx, t) . interior_unsafe ( )
2092
2078
}
@@ -2149,7 +2135,7 @@ pub fn type_contents(cx: &ctxt, ty: t) -> TypeContents {
2149
2135
cache. insert ( ty_id, TC :: None ) ;
2150
2136
2151
2137
let result = match get ( ty) . sty {
2152
- // Scalar and unique types are sendable, freezable, and durable
2138
+ // Scalar and unique types are sendable, and durable
2153
2139
ty_nil | ty_bot | ty_bool | ty_int( _) | ty_uint( _) | ty_float( _) |
2154
2140
ty_bare_fn( _) | ty:: ty_char => {
2155
2141
TC :: None
@@ -2287,9 +2273,7 @@ pub fn type_contents(cx: &ctxt, ty: t) -> TypeContents {
2287
2273
did : ast:: DefId ,
2288
2274
tc : TypeContents )
2289
2275
-> TypeContents {
2290
- if Some ( did) == cx. lang_items . no_freeze_bound ( ) {
2291
- tc | TC :: ReachesMutable
2292
- } else if Some ( did) == cx. lang_items . no_send_bound ( ) {
2276
+ if Some ( did) == cx. lang_items . no_send_bound ( ) {
2293
2277
tc | TC :: ReachesNonsendAnnot
2294
2278
} else if Some ( did) == cx. lang_items . managed_bound ( ) {
2295
2279
tc | TC :: Managed
@@ -2374,7 +2358,6 @@ pub fn type_contents(cx: &ctxt, ty: t) -> TypeContents {
2374
2358
tc = tc - match bound {
2375
2359
BoundStatic => TC :: Nonstatic ,
2376
2360
BoundSend => TC :: Nonsendable ,
2377
- BoundFreeze => TC :: Nonfreezable ,
2378
2361
BoundSized => TC :: Nonsized ,
2379
2362
BoundPod => TC :: Nonpod ,
2380
2363
BoundShare => TC :: Nonsharable ,
0 commit comments