File tree 3 files changed +10
-2
lines changed
3 files changed +10
-2
lines changed Original file line number Diff line number Diff line change
1
+ #![ unstable( feature = "std_internals" , issue = "none" ) ]
2
+ #![ doc( hidden) ]
1
3
use crate :: iter:: { FusedIterator , TrustedLen } ;
2
4
use crate :: num:: NonZero ;
3
5
use crate :: ub_checks;
@@ -9,7 +11,7 @@ use crate::ub_checks;
9
11
/// (Normal `Range` code needs to handle degenerate ranges like `10..0`,
10
12
/// which takes extra checks compared to only handling the canonical form.)
11
13
#[ derive( Clone , Debug , PartialEq , Eq ) ]
12
- pub ( crate ) struct IndexRange {
14
+ pub struct IndexRange {
13
15
start : usize ,
14
16
end : usize ,
15
17
}
Original file line number Diff line number Diff line change @@ -181,7 +181,9 @@ pub(crate) use self::drop::fallback_surface_drop;
181
181
pub use self :: function:: { Fn , FnMut , FnOnce } ;
182
182
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
183
183
pub use self :: index:: { Index , IndexMut } ;
184
- pub ( crate ) use self :: index_range:: IndexRange ;
184
+ #[ doc( hidden) ]
185
+ #[ unstable( feature = "std_internals" , issue = "none" ) ]
186
+ pub use self :: index_range:: IndexRange ;
185
187
#[ unstable( feature = "one_sided_range" , issue = "69780" ) ]
186
188
pub use self :: range:: OneSidedRange ;
187
189
#[ stable( feature = "inclusive_range" , since = "1.26.0" ) ]
Original file line number Diff line number Diff line change @@ -149,6 +149,8 @@ mod private_slice_index {
149
149
#[ unstable( feature = "new_range_api" , issue = "125687" ) ]
150
150
impl Sealed for range:: RangeFrom < usize > { }
151
151
152
+ #[ doc( hidden) ]
153
+ #[ unstable( feature = "std_internals" , issue = "none" ) ]
152
154
impl Sealed for ops:: IndexRange { }
153
155
}
154
156
@@ -283,6 +285,8 @@ unsafe impl<T> SliceIndex<[T]> for usize {
283
285
284
286
/// Because `IndexRange` guarantees `start <= end`, fewer checks are needed here
285
287
/// than there are for a general `Range<usize>` (which might be `100..3`).
288
+ #[ doc( hidden) ]
289
+ #[ unstable( feature = "std_internals" , issue = "none" ) ]
286
290
unsafe impl < T > SliceIndex < [ T ] > for ops:: IndexRange {
287
291
type Output = [ T ] ;
288
292
You can’t perform that action at this time.
0 commit comments