@@ -556,7 +556,7 @@ impl<T: ?Sized> Cell<T> {
556
556
#[ inline]
557
557
#[ stable( feature = "cell_as_ptr" , since = "1.12.0" ) ]
558
558
#[ rustc_const_stable( feature = "const_cell_as_ptr" , since = "1.32.0" ) ]
559
- #[ cfg_attr ( not ( bootstrap ) , rustc_never_returns_null_ptr) ]
559
+ #[ rustc_never_returns_null_ptr]
560
560
pub const fn as_ptr ( & self ) -> * mut T {
561
561
self . value . get ( )
562
562
}
@@ -1112,7 +1112,7 @@ impl<T: ?Sized> RefCell<T> {
1112
1112
/// ```
1113
1113
#[ inline]
1114
1114
#[ stable( feature = "cell_as_ptr" , since = "1.12.0" ) ]
1115
- #[ cfg_attr ( not ( bootstrap ) , rustc_never_returns_null_ptr) ]
1115
+ #[ rustc_never_returns_null_ptr]
1116
1116
pub fn as_ptr ( & self ) -> * mut T {
1117
1117
self . value . get ( )
1118
1118
}
@@ -2107,7 +2107,7 @@ impl<T: ?Sized> UnsafeCell<T> {
2107
2107
#[ inline( always) ]
2108
2108
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
2109
2109
#[ rustc_const_stable( feature = "const_unsafecell_get" , since = "1.32.0" ) ]
2110
- #[ cfg_attr ( not ( bootstrap ) , rustc_never_returns_null_ptr) ]
2110
+ #[ rustc_never_returns_null_ptr]
2111
2111
pub const fn get ( & self ) -> * mut T {
2112
2112
// We can just cast the pointer from `UnsafeCell<T>` to `T` because of
2113
2113
// #[repr(transparent)]. This exploits std's special status, there is
@@ -2251,7 +2251,7 @@ impl<T: ?Sized> SyncUnsafeCell<T> {
2251
2251
/// when casting to `&mut T`, and ensure that there are no mutations
2252
2252
/// or mutable aliases going on when casting to `&T`
2253
2253
#[ inline]
2254
- #[ cfg_attr ( not ( bootstrap ) , rustc_never_returns_null_ptr) ]
2254
+ #[ rustc_never_returns_null_ptr]
2255
2255
pub const fn get ( & self ) -> * mut T {
2256
2256
self . value . get ( )
2257
2257
}
0 commit comments