@@ -587,6 +587,7 @@ impl<T: ?Sized> Cell<T> {
587
587
#[ inline]
588
588
#[ stable( feature = "cell_as_ptr" , since = "1.12.0" ) ]
589
589
#[ rustc_const_stable( feature = "const_cell_as_ptr" , since = "1.32.0" ) ]
590
+ #[ cfg_attr( not( bootstrap) , rustc_as_ptr) ]
590
591
#[ rustc_never_returns_null_ptr]
591
592
pub const fn as_ptr ( & self ) -> * mut T {
592
593
self . value . get ( )
@@ -1149,6 +1150,7 @@ impl<T: ?Sized> RefCell<T> {
1149
1150
/// ```
1150
1151
#[ inline]
1151
1152
#[ stable( feature = "cell_as_ptr" , since = "1.12.0" ) ]
1153
+ #[ cfg_attr( not( bootstrap) , rustc_as_ptr) ]
1152
1154
#[ rustc_never_returns_null_ptr]
1153
1155
pub fn as_ptr ( & self ) -> * mut T {
1154
1156
self . value . get ( )
@@ -2157,6 +2159,7 @@ impl<T: ?Sized> UnsafeCell<T> {
2157
2159
#[ inline( always) ]
2158
2160
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
2159
2161
#[ rustc_const_stable( feature = "const_unsafecell_get" , since = "1.32.0" ) ]
2162
+ #[ cfg_attr( not( bootstrap) , rustc_as_ptr) ]
2160
2163
#[ rustc_never_returns_null_ptr]
2161
2164
pub const fn get ( & self ) -> * mut T {
2162
2165
// We can just cast the pointer from `UnsafeCell<T>` to `T` because of
@@ -2303,6 +2306,7 @@ impl<T: ?Sized> SyncUnsafeCell<T> {
2303
2306
/// when casting to `&mut T`, and ensure that there are no mutations
2304
2307
/// or mutable aliases going on when casting to `&T`
2305
2308
#[ inline]
2309
+ #[ cfg_attr( not( bootstrap) , rustc_as_ptr) ]
2306
2310
#[ rustc_never_returns_null_ptr]
2307
2311
pub const fn get ( & self ) -> * mut T {
2308
2312
self . value . get ( )
0 commit comments