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 ,
@@ -243,8 +241,6 @@ pub unsafe fn write<T>(dst: *mut T, src: T) {
243
241
/// Basic usage:
244
242
///
245
243
/// ```
246
- /// #![feature(ptr_unaligned)]
247
- ///
248
244
/// let mut x = 0;
249
245
/// let y = &mut x as *mut i32;
250
246
/// let z = 12;
@@ -255,7 +251,7 @@ pub unsafe fn write<T>(dst: *mut T, src: T) {
255
251
/// }
256
252
/// ```
257
253
#[ inline]
258
- #[ unstable ( feature = "ptr_unaligned" , issue = "37955 " ) ]
254
+ #[ stable ( feature = "ptr_unaligned" , since = "1.17.0 " ) ]
259
255
pub unsafe fn write_unaligned < T > ( dst : * mut T , src : T ) {
260
256
copy_nonoverlapping ( & src as * const T as * const u8 ,
261
257
dst as * mut u8 ,
You can’t perform that action at this time.
0 commit comments