@@ -115,6 +115,7 @@ impl<Idx: PartialOrd<Idx>> Range<Idx> {
115115 /// assert!(!(0.0..f32::NAN).contains(&0.5));
116116 /// assert!(!(f32::NAN..1.0).contains(&0.5));
117117 /// ```
118+ #[ inline]
118119 #[ stable( feature = "range_contains" , since = "1.35.0" ) ]
119120 pub fn contains < U > ( & self , item : & U ) -> bool
120121 where
@@ -141,6 +142,7 @@ impl<Idx: PartialOrd<Idx>> Range<Idx> {
141142 /// assert!( (3.0..f32::NAN).is_empty());
142143 /// assert!( (f32::NAN..5.0).is_empty());
143144 /// ```
145+ #[ inline]
144146 #[ stable( feature = "range_is_empty" , since = "1.47.0" ) ]
145147 pub fn is_empty ( & self ) -> bool {
146148 !( self . start < self . end )
@@ -213,6 +215,7 @@ impl<Idx: PartialOrd<Idx>> RangeFrom<Idx> {
213215 /// assert!(!(0.0..).contains(&f32::NAN));
214216 /// assert!(!(f32::NAN..).contains(&0.5));
215217 /// ```
218+ #[ inline]
216219 #[ stable( feature = "range_contains" , since = "1.35.0" ) ]
217220 pub fn contains < U > ( & self , item : & U ) -> bool
218221 where
@@ -294,6 +297,7 @@ impl<Idx: PartialOrd<Idx>> RangeTo<Idx> {
294297 /// assert!(!(..1.0).contains(&f32::NAN));
295298 /// assert!(!(..f32::NAN).contains(&0.5));
296299 /// ```
300+ #[ inline]
297301 #[ stable( feature = "range_contains" , since = "1.35.0" ) ]
298302 pub fn contains < U > ( & self , item : & U ) -> bool
299303 where
@@ -500,6 +504,7 @@ impl<Idx: PartialOrd<Idx>> RangeInclusive<Idx> {
500504 /// // Precise field values are unspecified here
501505 /// assert!(!r.contains(&3) && !r.contains(&5));
502506 /// ```
507+ #[ inline]
503508 #[ stable( feature = "range_contains" , since = "1.35.0" ) ]
504509 pub fn contains < U > ( & self , item : & U ) -> bool
505510 where
@@ -613,6 +618,7 @@ impl<Idx: PartialOrd<Idx>> RangeToInclusive<Idx> {
613618 /// assert!(!(..=1.0).contains(&f32::NAN));
614619 /// assert!(!(..=f32::NAN).contains(&0.5));
615620 /// ```
621+ #[ inline]
616622 #[ stable( feature = "range_contains" , since = "1.35.0" ) ]
617623 pub fn contains < U > ( & self , item : & U ) -> bool
618624 where
@@ -808,6 +814,7 @@ pub trait RangeBounds<T: ?Sized> {
808814 /// assert!(!(0.0..1.0).contains(&f32::NAN));
809815 /// assert!(!(0.0..f32::NAN).contains(&0.5));
810816 /// assert!(!(f32::NAN..1.0).contains(&0.5));
817+ #[ inline]
811818 #[ stable( feature = "range_contains" , since = "1.35.0" ) ]
812819 fn contains < U > ( & self , item : & U ) -> bool
813820 where
0 commit comments