@@ -813,12 +813,14 @@ fn panic_already_mutably_borrowed(err: BorrowError) -> ! {
813813type BorrowFlag = isize ;
814814const UNUSED : BorrowFlag = 0 ;
815815
816- #[ inline( always) ]
816+ #[ cfg_attr( bootstrap, inline( always) ) ]
817+ #[ cfg_attr( not( bootstrap) , inline( usually) ) ]
817818fn is_writing ( x : BorrowFlag ) -> bool {
818819 x < UNUSED
819820}
820821
821- #[ inline( always) ]
822+ #[ cfg_attr( bootstrap, inline( always) ) ]
823+ #[ cfg_attr( not( bootstrap) , inline( usually) ) ]
822824fn is_reading ( x : BorrowFlag ) -> bool {
823825 x > UNUSED
824826}
@@ -2079,7 +2081,8 @@ impl<T> UnsafeCell<T> {
20792081 /// ```
20802082 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
20812083 #[ rustc_const_stable( feature = "const_unsafe_cell_new" , since = "1.32.0" ) ]
2082- #[ inline( always) ]
2084+ #[ cfg_attr( bootstrap, inline( always) ) ]
2085+ #[ cfg_attr( not( bootstrap) , inline( usually) ) ]
20832086 pub const fn new ( value : T ) -> UnsafeCell < T > {
20842087 UnsafeCell { value }
20852088 }
@@ -2095,7 +2098,8 @@ impl<T> UnsafeCell<T> {
20952098 ///
20962099 /// let five = uc.into_inner();
20972100 /// ```
2098- #[ inline( always) ]
2101+ #[ cfg_attr( bootstrap, inline( always) ) ]
2102+ #[ cfg_attr( not( bootstrap) , inline( usually) ) ]
20992103 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
21002104 // When this is const stabilized, please remove `primitive_into_inner` below.
21012105 #[ rustc_const_unstable( feature = "const_cell_into_inner" , issue = "78729" ) ]
@@ -2119,7 +2123,8 @@ impl<T: ?Sized> UnsafeCell<T> {
21192123 /// *uc.get_mut() -= 1;
21202124 /// assert_eq!(*uc.get_mut(), 41);
21212125 /// ```
2122- #[ inline( always) ]
2126+ #[ cfg_attr( bootstrap, inline( always) ) ]
2127+ #[ cfg_attr( not( bootstrap) , inline( usually) ) ]
21232128 #[ unstable( feature = "unsafe_cell_from_mut" , issue = "111645" ) ]
21242129 pub const fn from_mut ( value : & mut T ) -> & mut UnsafeCell < T > {
21252130 // SAFETY: `UnsafeCell<T>` has the same memory layout as `T` due to #[repr(transparent)].
@@ -2142,7 +2147,8 @@ impl<T: ?Sized> UnsafeCell<T> {
21422147 ///
21432148 /// let five = uc.get();
21442149 /// ```
2145- #[ inline( always) ]
2150+ #[ cfg_attr( bootstrap, inline( always) ) ]
2151+ #[ cfg_attr( not( bootstrap) , inline( usually) ) ]
21462152 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
21472153 #[ rustc_const_stable( feature = "const_unsafecell_get" , since = "1.32.0" ) ]
21482154 #[ rustc_never_returns_null_ptr]
@@ -2168,7 +2174,8 @@ impl<T: ?Sized> UnsafeCell<T> {
21682174 ///
21692175 /// assert_eq!(*c.get_mut(), 6);
21702176 /// ```
2171- #[ inline( always) ]
2177+ #[ cfg_attr( bootstrap, inline( always) ) ]
2178+ #[ cfg_attr( not( bootstrap) , inline( usually) ) ]
21722179 #[ stable( feature = "unsafe_cell_get_mut" , since = "1.50.0" ) ]
21732180 #[ rustc_const_unstable( feature = "const_unsafecell_get_mut" , issue = "88836" ) ]
21742181 pub const fn get_mut ( & mut self ) -> & mut T {
@@ -2203,7 +2210,8 @@ impl<T: ?Sized> UnsafeCell<T> {
22032210 ///
22042211 /// assert_eq!(uc.into_inner(), 5);
22052212 /// ```
2206- #[ inline( always) ]
2213+ #[ cfg_attr( bootstrap, inline( always) ) ]
2214+ #[ cfg_attr( not( bootstrap) , inline( usually) ) ]
22072215 #[ stable( feature = "unsafe_cell_raw_get" , since = "1.56.0" ) ]
22082216 #[ rustc_const_stable( feature = "unsafe_cell_raw_get" , since = "1.56.0" ) ]
22092217 #[ rustc_diagnostic_item = "unsafe_cell_raw_get" ]
0 commit comments