@@ -354,7 +354,7 @@ impl<T: ?Sized> Rc<T> {
354
354
}
355
355
356
356
impl < T : ?Sized , A : Allocator > Rc < T , A > {
357
- #[ inline( always) ]
357
+ #[ cfg_attr ( bootstrap , inline( always) ) ] # [ cfg_attr ( not ( bootstrap ) , inline ( usually ) ) ]
358
358
fn inner ( & self ) -> & RcBox < T > {
359
359
// This unsafety is ok because while this Rc is alive we're guaranteed
360
360
// that the inner pointer is valid.
@@ -2207,7 +2207,7 @@ impl<T: Copy> RcFromSlice<T> for Rc<[T]> {
2207
2207
impl < T : ?Sized , A : Allocator > Deref for Rc < T , A > {
2208
2208
type Target = T ;
2209
2209
2210
- #[ inline( always) ]
2210
+ #[ cfg_attr ( bootstrap , inline( always) ) ] # [ cfg_attr ( not ( bootstrap ) , inline ( usually ) ) ]
2211
2211
fn deref ( & self ) -> & T {
2212
2212
& self . inner ( ) . value
2213
2213
}
@@ -2453,7 +2453,7 @@ impl<T: ?Sized + PartialOrd, A: Allocator> PartialOrd for Rc<T, A> {
2453
2453
///
2454
2454
/// assert_eq!(Some(Ordering::Less), five.partial_cmp(&Rc::new(6)));
2455
2455
/// ```
2456
- #[ inline( always) ]
2456
+ #[ cfg_attr ( bootstrap , inline( always) ) ] # [ cfg_attr ( not ( bootstrap ) , inline ( usually ) ) ]
2457
2457
fn partial_cmp ( & self , other : & Rc < T , A > ) -> Option < Ordering > {
2458
2458
( * * self ) . partial_cmp ( & * * other)
2459
2459
}
@@ -2471,7 +2471,7 @@ impl<T: ?Sized + PartialOrd, A: Allocator> PartialOrd for Rc<T, A> {
2471
2471
///
2472
2472
/// assert!(five < Rc::new(6));
2473
2473
/// ```
2474
- #[ inline( always) ]
2474
+ #[ cfg_attr ( bootstrap , inline( always) ) ] # [ cfg_attr ( not ( bootstrap ) , inline ( usually ) ) ]
2475
2475
fn lt ( & self , other : & Rc < T , A > ) -> bool {
2476
2476
* * self < * * other
2477
2477
}
@@ -2489,7 +2489,7 @@ impl<T: ?Sized + PartialOrd, A: Allocator> PartialOrd for Rc<T, A> {
2489
2489
///
2490
2490
/// assert!(five <= Rc::new(5));
2491
2491
/// ```
2492
- #[ inline( always) ]
2492
+ #[ cfg_attr ( bootstrap , inline( always) ) ] # [ cfg_attr ( not ( bootstrap ) , inline ( usually ) ) ]
2493
2493
fn le ( & self , other : & Rc < T , A > ) -> bool {
2494
2494
* * self <= * * other
2495
2495
}
@@ -2507,7 +2507,7 @@ impl<T: ?Sized + PartialOrd, A: Allocator> PartialOrd for Rc<T, A> {
2507
2507
///
2508
2508
/// assert!(five > Rc::new(4));
2509
2509
/// ```
2510
- #[ inline( always) ]
2510
+ #[ cfg_attr ( bootstrap , inline( always) ) ] # [ cfg_attr ( not ( bootstrap ) , inline ( usually ) ) ]
2511
2511
fn gt ( & self , other : & Rc < T , A > ) -> bool {
2512
2512
* * self > * * other
2513
2513
}
@@ -2525,7 +2525,7 @@ impl<T: ?Sized + PartialOrd, A: Allocator> PartialOrd for Rc<T, A> {
2525
2525
///
2526
2526
/// assert!(five >= Rc::new(5));
2527
2527
/// ```
2528
- #[ inline( always) ]
2528
+ #[ cfg_attr ( bootstrap , inline( always) ) ] # [ cfg_attr ( not ( bootstrap ) , inline ( usually ) ) ]
2529
2529
fn ge ( & self , other : & Rc < T , A > ) -> bool {
2530
2530
* * self >= * * other
2531
2531
}
@@ -3527,24 +3527,24 @@ trait RcInnerPtr {
3527
3527
}
3528
3528
3529
3529
impl < T : ?Sized > RcInnerPtr for RcBox < T > {
3530
- #[ inline( always) ]
3530
+ #[ cfg_attr ( bootstrap , inline( always) ) ] # [ cfg_attr ( not ( bootstrap ) , inline ( usually ) ) ]
3531
3531
fn weak_ref ( & self ) -> & Cell < usize > {
3532
3532
& self . weak
3533
3533
}
3534
3534
3535
- #[ inline( always) ]
3535
+ #[ cfg_attr ( bootstrap , inline( always) ) ] # [ cfg_attr ( not ( bootstrap ) , inline ( usually ) ) ]
3536
3536
fn strong_ref ( & self ) -> & Cell < usize > {
3537
3537
& self . strong
3538
3538
}
3539
3539
}
3540
3540
3541
3541
impl < ' a > RcInnerPtr for WeakInner < ' a > {
3542
- #[ inline( always) ]
3542
+ #[ cfg_attr ( bootstrap , inline( always) ) ] # [ cfg_attr ( not ( bootstrap ) , inline ( usually ) ) ]
3543
3543
fn weak_ref ( & self ) -> & Cell < usize > {
3544
3544
self . weak
3545
3545
}
3546
3546
3547
- #[ inline( always) ]
3547
+ #[ cfg_attr ( bootstrap , inline( always) ) ] # [ cfg_attr ( not ( bootstrap ) , inline ( usually ) ) ]
3548
3548
fn strong_ref ( & self ) -> & Cell < usize > {
3549
3549
self . strong
3550
3550
}
0 commit comments