mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
Document privacy of RangeInclusive fields
This commit is contained in:
parent
c64eecf4d0
commit
519fc84852
@ -333,6 +333,11 @@ impl<Idx: PartialOrd<Idx>> RangeTo<Idx> {
|
||||
#[derive(Clone)] // not Copy -- see #27186
|
||||
#[stable(feature = "inclusive_range", since = "1.26.0")]
|
||||
pub struct RangeInclusive<Idx> {
|
||||
// Note that the fields here are not public to allow changing the
|
||||
// representation in the future; in particular, while we could plausibly
|
||||
// expose start/end, modifying them without changing (future/current)
|
||||
// private fields may lead to incorrect behavior, so we don't want to
|
||||
// support that mode.
|
||||
pub(crate) start: Idx,
|
||||
pub(crate) end: Idx,
|
||||
pub(crate) is_empty: Option<bool>,
|
||||
|
Loading…
Reference in New Issue
Block a user