@@ -299,7 +299,7 @@ impl<T> [T] {
299
299
/// assert_eq!(None, v.get(0..4));
300
300
/// ```
301
301
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
302
- #[ inline]
302
+ #[ inline( always ) ]
303
303
pub fn get < I > ( & self , index : I ) -> Option < & I :: Output >
304
304
where
305
305
I : SliceIndex < Self > ,
@@ -323,7 +323,7 @@ impl<T> [T] {
323
323
/// assert_eq!(x, &[0, 42, 2]);
324
324
/// ```
325
325
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
326
- #[ inline]
326
+ #[ inline( always ) ]
327
327
pub fn get_mut < I > ( & mut self , index : I ) -> Option < & mut I :: Output >
328
328
where
329
329
I : SliceIndex < Self > ,
@@ -354,7 +354,7 @@ impl<T> [T] {
354
354
/// }
355
355
/// ```
356
356
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
357
- #[ inline]
357
+ #[ inline( always ) ]
358
358
pub unsafe fn get_unchecked < I > ( & self , index : I ) -> & I :: Output
359
359
where
360
360
I : SliceIndex < Self > ,
@@ -390,7 +390,7 @@ impl<T> [T] {
390
390
/// assert_eq!(x, &[1, 13, 4]);
391
391
/// ```
392
392
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
393
- #[ inline]
393
+ #[ inline( always ) ]
394
394
pub unsafe fn get_unchecked_mut < I > ( & mut self , index : I ) -> & mut I :: Output
395
395
where
396
396
I : SliceIndex < Self > ,
@@ -429,7 +429,7 @@ impl<T> [T] {
429
429
/// [`as_mut_ptr`]: slice::as_mut_ptr
430
430
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
431
431
#[ rustc_const_stable( feature = "const_slice_as_ptr" , since = "1.32.0" ) ]
432
- #[ inline]
432
+ #[ inline( always ) ]
433
433
pub const fn as_ptr ( & self ) -> * const T {
434
434
self as * const [ T ] as * const T
435
435
}
@@ -457,7 +457,7 @@ impl<T> [T] {
457
457
/// ```
458
458
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
459
459
#[ rustc_const_unstable( feature = "const_ptr_offset" , issue = "71499" ) ]
460
- #[ inline]
460
+ #[ inline( always ) ]
461
461
pub const fn as_mut_ptr ( & mut self ) -> * mut T {
462
462
self as * mut [ T ] as * mut T
463
463
}
@@ -702,7 +702,7 @@ impl<T> [T] {
702
702
/// assert_eq!(iterator.next(), None);
703
703
/// ```
704
704
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
705
- #[ inline]
705
+ #[ inline( always ) ]
706
706
pub fn iter ( & self ) -> Iter < ' _ , T > {
707
707
Iter :: new ( self )
708
708
}
@@ -719,7 +719,7 @@ impl<T> [T] {
719
719
/// assert_eq!(x, &[3, 4, 6]);
720
720
/// ```
721
721
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
722
- #[ inline]
722
+ #[ inline( always ) ]
723
723
pub fn iter_mut ( & mut self ) -> IterMut < ' _ , T > {
724
724
IterMut :: new ( self )
725
725
}
@@ -3544,7 +3544,7 @@ pub trait SlicePattern {
3544
3544
impl < T > SlicePattern for [ T ] {
3545
3545
type Item = T ;
3546
3546
3547
- #[ inline]
3547
+ #[ inline( always ) ]
3548
3548
fn as_slice ( & self ) -> & [ Self :: Item ] {
3549
3549
self
3550
3550
}
@@ -3554,7 +3554,7 @@ impl<T> SlicePattern for [T] {
3554
3554
impl < T , const N : usize > SlicePattern for [ T ; N ] {
3555
3555
type Item = T ;
3556
3556
3557
- #[ inline]
3557
+ #[ inline( always ) ]
3558
3558
fn as_slice ( & self ) -> & [ Self :: Item ] {
3559
3559
self
3560
3560
}
0 commit comments