File tree 1 file changed +2
-6
lines changed
1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -161,8 +161,6 @@ pub unsafe fn read<T>(src: *const T) -> T {
161
161
/// Basic usage:
162
162
///
163
163
/// ```
164
- /// #![feature(ptr_unaligned)]
165
- ///
166
164
/// let x = 12;
167
165
/// let y = &x as *const i32;
168
166
///
@@ -171,7 +169,7 @@ pub unsafe fn read<T>(src: *const T) -> T {
171
169
/// }
172
170
/// ```
173
171
#[ inline( always) ]
174
- #[ unstable ( feature = "ptr_unaligned" , issue = "37955 " ) ]
172
+ #[ stable ( feature = "ptr_unaligned" , since = "1.17.0 " ) ]
175
173
pub unsafe fn read_unaligned < T > ( src : * const T ) -> T {
176
174
let mut tmp: T = mem:: uninitialized ( ) ;
177
175
copy_nonoverlapping ( src as * const u8 ,
@@ -241,8 +239,6 @@ pub unsafe fn write<T>(dst: *mut T, src: T) {
241
239
/// Basic usage:
242
240
///
243
241
/// ```
244
- /// #![feature(ptr_unaligned)]
245
- ///
246
242
/// let mut x = 0;
247
243
/// let y = &mut x as *mut i32;
248
244
/// let z = 12;
@@ -253,7 +249,7 @@ pub unsafe fn write<T>(dst: *mut T, src: T) {
253
249
/// }
254
250
/// ```
255
251
#[ inline]
256
- #[ unstable ( feature = "ptr_unaligned" , issue = "37955 " ) ]
252
+ #[ stable ( feature = "ptr_unaligned" , since = "1.17.0 " ) ]
257
253
pub unsafe fn write_unaligned < T > ( dst : * mut T , src : T ) {
258
254
copy_nonoverlapping ( & src as * const T as * const u8 ,
259
255
dst as * mut u8 ,
You can’t perform that action at this time.
0 commit comments