@@ -587,6 +587,7 @@ impl<T: ?Sized> Cell<T> {
587587 #[ inline]
588588 #[ stable( feature = "cell_as_ptr" , since = "1.12.0" ) ]
589589 #[ rustc_const_stable( feature = "const_cell_as_ptr" , since = "1.32.0" ) ]
590+ #[ cfg_attr( not( bootstrap) , rustc_as_ptr) ]
590591 #[ rustc_never_returns_null_ptr]
591592 pub const fn as_ptr ( & self ) -> * mut T {
592593 self . value . get ( )
@@ -1149,6 +1150,7 @@ impl<T: ?Sized> RefCell<T> {
11491150 /// ```
11501151 #[ inline]
11511152 #[ stable( feature = "cell_as_ptr" , since = "1.12.0" ) ]
1153+ #[ cfg_attr( not( bootstrap) , rustc_as_ptr) ]
11521154 #[ rustc_never_returns_null_ptr]
11531155 pub fn as_ptr ( & self ) -> * mut T {
11541156 self . value . get ( )
@@ -2157,6 +2159,7 @@ impl<T: ?Sized> UnsafeCell<T> {
21572159 #[ inline( always) ]
21582160 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
21592161 #[ rustc_const_stable( feature = "const_unsafecell_get" , since = "1.32.0" ) ]
2162+ #[ cfg_attr( not( bootstrap) , rustc_as_ptr) ]
21602163 #[ rustc_never_returns_null_ptr]
21612164 pub const fn get ( & self ) -> * mut T {
21622165 // We can just cast the pointer from `UnsafeCell<T>` to `T` because of
@@ -2303,6 +2306,7 @@ impl<T: ?Sized> SyncUnsafeCell<T> {
23032306 /// when casting to `&mut T`, and ensure that there are no mutations
23042307 /// or mutable aliases going on when casting to `&T`
23052308 #[ inline]
2309+ #[ cfg_attr( not( bootstrap) , rustc_as_ptr) ]
23062310 #[ rustc_never_returns_null_ptr]
23072311 pub const fn get ( & self ) -> * mut T {
23082312 self . value . get ( )
0 commit comments