We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 2135cc4 + 519fc84 commit 5a0f17eCopy full SHA for 5a0f17e
src/libcore/ops/range.rs
@@ -333,6 +333,11 @@ impl<Idx: PartialOrd<Idx>> RangeTo<Idx> {
333
#[derive(Clone)] // not Copy -- see #27186
334
#[stable(feature = "inclusive_range", since = "1.26.0")]
335
pub struct RangeInclusive<Idx> {
336
+ // Note that the fields here are not public to allow changing the
337
+ // representation in the future; in particular, while we could plausibly
338
+ // expose start/end, modifying them without changing (future/current)
339
+ // private fields may lead to incorrect behavior, so we don't want to
340
+ // support that mode.
341
pub(crate) start: Idx,
342
pub(crate) end: Idx,
343
pub(crate) is_empty: Option<bool>,
0 commit comments