Skip to content

Commit

Permalink
Rollup merge of rust-lang#67490 - Mark-Simulacrum:i-67371, r=Dylan-DPC
Browse files Browse the repository at this point in the history
Document privacy of RangeInclusive fields

Fixes rust-lang#67371
  • Loading branch information
Centril authored Dec 21, 2019
2 parents 2135cc4 + 519fc84 commit 5a0f17e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/libcore/ops/range.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>,
Expand Down

0 comments on commit 5a0f17e

Please sign in to comment.