Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
72b6825
test `#[naked]` with `#[link_section = "..."]` on windows
folkertdev Mar 30, 2026
edad629
Remove `BuiltinLintDiag::ElidedLifetimesInPaths` variant
GuillaumeGomez Apr 6, 2026
e03e00f
Remove `BuiltinLintDiag::UnusedImports` variant
GuillaumeGomez Apr 6, 2026
12457f8
Remove `BuiltinLintDiag::NamedArgumentUsedPositionally` variant
GuillaumeGomez Apr 6, 2026
caeaf19
Remove `BuiltinLintDiag`
GuillaumeGomez Apr 6, 2026
aa9da4b
Hexagon inline asm: add reg_pair, vreg, vreg_pair, and qreg register …
androm3da Apr 2, 2026
574d877
Parenthesize block-like expressions in index base of pretty printer
aytey Mar 18, 2026
56f43b5
Parenthesize block-like expressions in call callee of pretty printer
aytey Apr 8, 2026
27e3d26
rename test
aytey Apr 8, 2026
1e8c6f0
Nooooo my workflow relied on programs using `niko` as an identifier
jdonszelmann Apr 6, 2026
fbdcd19
make `expected_literal` positive
jdonszelmann Apr 6, 2026
092f0ca
Clarify that `core::range::RangeInclusive` does not have special syntax
shepmaster Apr 8, 2026
eef4363
Clarify that `core::range::{Range,RangeFrom,RangeToInclusive}` do not…
shepmaster Apr 8, 2026
1d0d172
Rollup merge of #154912 - GuillaumeGomez:migrate-diag, r=JonathanBrouwer
JonathanBrouwer Apr 8, 2026
b040d54
Rollup merge of #154598 - folkertdev:windows-naked-link-section, r=ma…
JonathanBrouwer Apr 8, 2026
3fb712c
Rollup merge of #154719 - androm3da:hexagon-inline-asm-register-class…
JonathanBrouwer Apr 8, 2026
8be4c46
Rollup merge of #154057 - aytey:fix-block-index-paren, r=fmease
JonathanBrouwer Apr 8, 2026
83e8133
Rollup merge of #154893 - jdonszelmann:expected-literal-positive, r=J…
JonathanBrouwer Apr 8, 2026
efa9224
Rollup merge of #155002 - shepmaster:clarify-new-range, r=tgross35
JonathanBrouwer Apr 8, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Clarify that core::range::RangeInclusive does not have special syntax
I'm ignoring the fact that there's a feature to change the behavior of
the syntax. I just want to help prevent confusing the people reading
the docs.
  • Loading branch information
shepmaster committed Apr 8, 2026
commit 092f0ca1bd6ce2e96796ab82c3325750a2254e38
11 changes: 7 additions & 4 deletions library/core/src/range.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,21 +223,24 @@ impl<T> const From<legacy::Range<T>> for Range<T> {
}
}

/// A range bounded inclusively below and above (`start..=last`).
/// A range bounded inclusively below and above.
///
/// The `RangeInclusive` `start..=last` contains all values with `x >= start`
/// The `RangeInclusive` contains all values with `x >= start`
/// and `x <= last`. It is empty unless `start <= last`.
///
/// # Examples
///
/// The `start..=last` syntax is a `RangeInclusive`:
///
/// ```
/// use core::range::RangeInclusive;
///
/// assert_eq!(RangeInclusive::from(3..=5), RangeInclusive { start: 3, last: 5 });
/// assert_eq!(3 + 4 + 5, RangeInclusive::from(3..=5).into_iter().sum());
/// ```
///
/// # Edition notes
///
/// It is planned that the syntax `start..=last` will construct this
/// type in a future edition, but it does not do so today.
#[lang = "RangeInclusiveCopy"]
#[derive(Clone, Copy, PartialEq, Eq, Hash)]
#[stable(feature = "new_range_inclusive_api", since = "1.95.0")]
Expand Down