@@ -42,7 +42,7 @@ impl<T: ?Sized> *mut T {
42
42
/// Casts to a pointer of another type.
43
43
#[ stable( feature = "ptr_cast" , since = "1.38.0" ) ]
44
44
#[ rustc_const_stable( feature = "const_ptr_cast" , since = "1.38.0" ) ]
45
- #[ inline]
45
+ #[ inline( always ) ]
46
46
pub const fn cast < U > ( self ) -> * mut U {
47
47
self as _
48
48
}
@@ -551,7 +551,7 @@ impl<T: ?Sized> *mut T {
551
551
/// ```
552
552
#[ stable( feature = "ptr_offset_from" , since = "1.47.0" ) ]
553
553
#[ rustc_const_unstable( feature = "const_ptr_offset_from" , issue = "41079" ) ]
554
- #[ inline]
554
+ #[ inline( always ) ]
555
555
pub const unsafe fn offset_from ( self , origin : * const T ) -> isize
556
556
where
557
557
T : Sized ,
@@ -859,7 +859,7 @@ impl<T: ?Sized> *mut T {
859
859
/// [`ptr::read`]: crate::ptr::read()
860
860
#[ stable( feature = "pointer_methods" , since = "1.26.0" ) ]
861
861
#[ rustc_const_unstable( feature = "const_ptr_read" , issue = "80377" ) ]
862
- #[ inline]
862
+ #[ inline( always ) ]
863
863
pub const unsafe fn read ( self ) -> T
864
864
where
865
865
T : Sized ,
@@ -879,7 +879,7 @@ impl<T: ?Sized> *mut T {
879
879
///
880
880
/// [`ptr::read_volatile`]: crate::ptr::read_volatile()
881
881
#[ stable( feature = "pointer_methods" , since = "1.26.0" ) ]
882
- #[ inline]
882
+ #[ inline( always ) ]
883
883
pub unsafe fn read_volatile ( self ) -> T
884
884
where
885
885
T : Sized ,
@@ -898,7 +898,7 @@ impl<T: ?Sized> *mut T {
898
898
/// [`ptr::read_unaligned`]: crate::ptr::read_unaligned()
899
899
#[ stable( feature = "pointer_methods" , since = "1.26.0" ) ]
900
900
#[ rustc_const_unstable( feature = "const_ptr_read" , issue = "80377" ) ]
901
- #[ inline]
901
+ #[ inline( always ) ]
902
902
pub const unsafe fn read_unaligned ( self ) -> T
903
903
where
904
904
T : Sized ,
@@ -917,7 +917,7 @@ impl<T: ?Sized> *mut T {
917
917
/// [`ptr::copy`]: crate::ptr::copy()
918
918
#[ rustc_const_unstable( feature = "const_intrinsic_copy" , issue = "80697" ) ]
919
919
#[ stable( feature = "pointer_methods" , since = "1.26.0" ) ]
920
- #[ inline]
920
+ #[ inline( always ) ]
921
921
pub const unsafe fn copy_to ( self , dest : * mut T , count : usize )
922
922
where
923
923
T : Sized ,
@@ -936,7 +936,7 @@ impl<T: ?Sized> *mut T {
936
936
/// [`ptr::copy_nonoverlapping`]: crate::ptr::copy_nonoverlapping()
937
937
#[ rustc_const_unstable( feature = "const_intrinsic_copy" , issue = "80697" ) ]
938
938
#[ stable( feature = "pointer_methods" , since = "1.26.0" ) ]
939
- #[ inline]
939
+ #[ inline( always ) ]
940
940
pub const unsafe fn copy_to_nonoverlapping ( self , dest : * mut T , count : usize )
941
941
where
942
942
T : Sized ,
@@ -955,7 +955,7 @@ impl<T: ?Sized> *mut T {
955
955
/// [`ptr::copy`]: crate::ptr::copy()
956
956
#[ rustc_const_unstable( feature = "const_intrinsic_copy" , issue = "80697" ) ]
957
957
#[ stable( feature = "pointer_methods" , since = "1.26.0" ) ]
958
- #[ inline]
958
+ #[ inline( always ) ]
959
959
pub const unsafe fn copy_from ( self , src : * const T , count : usize )
960
960
where
961
961
T : Sized ,
@@ -974,7 +974,7 @@ impl<T: ?Sized> *mut T {
974
974
/// [`ptr::copy_nonoverlapping`]: crate::ptr::copy_nonoverlapping()
975
975
#[ rustc_const_unstable( feature = "const_intrinsic_copy" , issue = "80697" ) ]
976
976
#[ stable( feature = "pointer_methods" , since = "1.26.0" ) ]
977
- #[ inline]
977
+ #[ inline( always ) ]
978
978
pub const unsafe fn copy_from_nonoverlapping ( self , src : * const T , count : usize )
979
979
where
980
980
T : Sized ,
@@ -989,7 +989,7 @@ impl<T: ?Sized> *mut T {
989
989
///
990
990
/// [`ptr::drop_in_place`]: crate::ptr::drop_in_place()
991
991
#[ stable( feature = "pointer_methods" , since = "1.26.0" ) ]
992
- #[ inline]
992
+ #[ inline( always ) ]
993
993
pub unsafe fn drop_in_place ( self ) {
994
994
// SAFETY: the caller must uphold the safety contract for `drop_in_place`.
995
995
unsafe { drop_in_place ( self ) }
@@ -1003,7 +1003,7 @@ impl<T: ?Sized> *mut T {
1003
1003
/// [`ptr::write`]: crate::ptr::write()
1004
1004
#[ stable( feature = "pointer_methods" , since = "1.26.0" ) ]
1005
1005
#[ rustc_const_unstable( feature = "const_ptr_write" , issue = "none" ) ]
1006
- #[ inline]
1006
+ #[ inline( always ) ]
1007
1007
pub const unsafe fn write ( self , val : T )
1008
1008
where
1009
1009
T : Sized ,
@@ -1019,7 +1019,7 @@ impl<T: ?Sized> *mut T {
1019
1019
///
1020
1020
/// [`ptr::write_bytes`]: crate::ptr::write_bytes()
1021
1021
#[ stable( feature = "pointer_methods" , since = "1.26.0" ) ]
1022
- #[ inline]
1022
+ #[ inline( always ) ]
1023
1023
pub unsafe fn write_bytes ( self , val : u8 , count : usize )
1024
1024
where
1025
1025
T : Sized ,
@@ -1039,7 +1039,7 @@ impl<T: ?Sized> *mut T {
1039
1039
///
1040
1040
/// [`ptr::write_volatile`]: crate::ptr::write_volatile()
1041
1041
#[ stable( feature = "pointer_methods" , since = "1.26.0" ) ]
1042
- #[ inline]
1042
+ #[ inline( always ) ]
1043
1043
pub unsafe fn write_volatile ( self , val : T )
1044
1044
where
1045
1045
T : Sized ,
@@ -1058,7 +1058,7 @@ impl<T: ?Sized> *mut T {
1058
1058
/// [`ptr::write_unaligned`]: crate::ptr::write_unaligned()
1059
1059
#[ stable( feature = "pointer_methods" , since = "1.26.0" ) ]
1060
1060
#[ rustc_const_unstable( feature = "const_ptr_write" , issue = "none" ) ]
1061
- #[ inline]
1061
+ #[ inline( always ) ]
1062
1062
pub const unsafe fn write_unaligned ( self , val : T )
1063
1063
where
1064
1064
T : Sized ,
@@ -1074,7 +1074,7 @@ impl<T: ?Sized> *mut T {
1074
1074
///
1075
1075
/// [`ptr::replace`]: crate::ptr::replace()
1076
1076
#[ stable( feature = "pointer_methods" , since = "1.26.0" ) ]
1077
- #[ inline]
1077
+ #[ inline( always ) ]
1078
1078
pub unsafe fn replace ( self , src : T ) -> T
1079
1079
where
1080
1080
T : Sized ,
@@ -1091,7 +1091,7 @@ impl<T: ?Sized> *mut T {
1091
1091
///
1092
1092
/// [`ptr::swap`]: crate::ptr::swap()
1093
1093
#[ stable( feature = "pointer_methods" , since = "1.26.0" ) ]
1094
- #[ inline]
1094
+ #[ inline( always ) ]
1095
1095
pub unsafe fn swap ( self , with : * mut T )
1096
1096
where
1097
1097
T : Sized ,
@@ -1170,7 +1170,7 @@ impl<T> *mut [T] {
1170
1170
/// let slice: *mut [i8] = ptr::slice_from_raw_parts_mut(ptr::null_mut(), 3);
1171
1171
/// assert_eq!(slice.len(), 3);
1172
1172
/// ```
1173
- #[ inline]
1173
+ #[ inline( always ) ]
1174
1174
#[ unstable( feature = "slice_ptr_len" , issue = "71146" ) ]
1175
1175
#[ rustc_const_unstable( feature = "const_slice_ptr_len" , issue = "71146" ) ]
1176
1176
pub const fn len ( self ) -> usize {
@@ -1190,7 +1190,7 @@ impl<T> *mut [T] {
1190
1190
/// let slice: *mut [i8] = ptr::slice_from_raw_parts_mut(ptr::null_mut(), 3);
1191
1191
/// assert_eq!(slice.as_mut_ptr(), 0 as *mut i8);
1192
1192
/// ```
1193
- #[ inline]
1193
+ #[ inline( always ) ]
1194
1194
#[ unstable( feature = "slice_ptr_get" , issue = "74265" ) ]
1195
1195
#[ rustc_const_unstable( feature = "slice_ptr_get" , issue = "74265" ) ]
1196
1196
pub const fn as_mut_ptr ( self ) -> * mut T {
@@ -1217,7 +1217,7 @@ impl<T> *mut [T] {
1217
1217
/// }
1218
1218
/// ```
1219
1219
#[ unstable( feature = "slice_ptr_get" , issue = "74265" ) ]
1220
- #[ inline]
1220
+ #[ inline( always ) ]
1221
1221
pub unsafe fn get_unchecked_mut < I > ( self , index : I ) -> * mut I :: Output
1222
1222
where
1223
1223
I : SliceIndex < [ T ] > ,
@@ -1332,7 +1332,7 @@ impl<T> *mut [T] {
1332
1332
// Equality for pointers
1333
1333
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1334
1334
impl < T : ?Sized > PartialEq for * mut T {
1335
- #[ inline]
1335
+ #[ inline( always ) ]
1336
1336
fn eq ( & self , other : & * mut T ) -> bool {
1337
1337
* self == * other
1338
1338
}
@@ -1357,27 +1357,27 @@ impl<T: ?Sized> Ord for *mut T {
1357
1357
1358
1358
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1359
1359
impl < T : ?Sized > PartialOrd for * mut T {
1360
- #[ inline]
1360
+ #[ inline( always ) ]
1361
1361
fn partial_cmp ( & self , other : & * mut T ) -> Option < Ordering > {
1362
1362
Some ( self . cmp ( other) )
1363
1363
}
1364
1364
1365
- #[ inline]
1365
+ #[ inline( always ) ]
1366
1366
fn lt ( & self , other : & * mut T ) -> bool {
1367
1367
* self < * other
1368
1368
}
1369
1369
1370
- #[ inline]
1370
+ #[ inline( always ) ]
1371
1371
fn le ( & self , other : & * mut T ) -> bool {
1372
1372
* self <= * other
1373
1373
}
1374
1374
1375
- #[ inline]
1375
+ #[ inline( always ) ]
1376
1376
fn gt ( & self , other : & * mut T ) -> bool {
1377
1377
* self > * other
1378
1378
}
1379
1379
1380
- #[ inline]
1380
+ #[ inline( always ) ]
1381
1381
fn ge ( & self , other : & * mut T ) -> bool {
1382
1382
* self >= * other
1383
1383
}
0 commit comments