File tree 2 files changed +20
-0
lines changed
2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -119,6 +119,11 @@ impl<T: ?Sized> *const T {
119
119
/// assert_eq!(p1.to_bits() - p0.to_bits(), 4);
120
120
/// ```
121
121
#[ unstable( feature = "ptr_to_from_bits" , issue = "91126" ) ]
122
+ #[ deprecated(
123
+ since = "1.67" ,
124
+ note = "replaced by the `exposed_addr` method, or update your code \
125
+ to follow the strict provenance rules using its APIs"
126
+ ) ]
122
127
pub fn to_bits ( self ) -> usize
123
128
where
124
129
T : Sized ,
@@ -140,6 +145,11 @@ impl<T: ?Sized> *const T {
140
145
/// assert_eq!(<*const u8>::from_bits(1), dangling);
141
146
/// ```
142
147
#[ unstable( feature = "ptr_to_from_bits" , issue = "91126" ) ]
148
+ #[ deprecated(
149
+ since = "1.67" ,
150
+ note = "replaced by the `ptr::from_exposed_addr` function, or update \
151
+ your code to follow the strict provenance rules using its APIs"
152
+ ) ]
143
153
#[ allow( fuzzy_provenance_casts) ] // this is an unstable and semi-deprecated cast function
144
154
pub fn from_bits ( bits : usize ) -> Self
145
155
where
Original file line number Diff line number Diff line change @@ -125,6 +125,11 @@ impl<T: ?Sized> *mut T {
125
125
/// assert_eq!(p1.to_bits() - p0.to_bits(), 4);
126
126
/// ```
127
127
#[ unstable( feature = "ptr_to_from_bits" , issue = "91126" ) ]
128
+ #[ deprecated(
129
+ since = "1.67" ,
130
+ note = "replaced by the `exposed_addr` method, or update your code \
131
+ to follow the strict provenance rules using its APIs"
132
+ ) ]
128
133
pub fn to_bits ( self ) -> usize
129
134
where
130
135
T : Sized ,
@@ -146,6 +151,11 @@ impl<T: ?Sized> *mut T {
146
151
/// assert_eq!(<*mut u8>::from_bits(1), dangling);
147
152
/// ```
148
153
#[ unstable( feature = "ptr_to_from_bits" , issue = "91126" ) ]
154
+ #[ deprecated(
155
+ since = "1.67" ,
156
+ note = "replaced by the `ptr::from_exposed_addr_mut` function, or \
157
+ update your code to follow the strict provenance rules using its APIs"
158
+ ) ]
149
159
#[ allow( fuzzy_provenance_casts) ] // this is an unstable and semi-deprecated cast function
150
160
pub fn from_bits ( bits : usize ) -> Self
151
161
where
You can’t perform that action at this time.
0 commit comments