Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Closed
Changes from 1 commit
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
c04d86d
Work around LLVM OCAML binding installation failure
roblabla Jan 29, 2018
4d92fe2
Fix span bug.
jseyfried Feb 9, 2018
4f8049a
Add Range[Inclusive]::is_empty
scottmcm Feb 9, 2018
7fe182f
Fix tidy
scottmcm Feb 9, 2018
b5cb393
Use is_empty in range iteration exhaustion tests
scottmcm Feb 10, 2018
6f70a11
range_is_empty tracking issue is #48111
scottmcm Feb 10, 2018
0cccd9a
Show better warning for trying to cast non-u8 scalar to char
GuillaumeGomez Feb 6, 2018
14f488e
Whitelist pclmul x86 feature flag
newpavlov Feb 10, 2018
877272b
typo fix
newpavlov Feb 10, 2018
3c01dea
Add comment about the problem, and use provided path if available
roblabla Feb 10, 2018
45d5a42
Correct a few stability attributes
ollie27 Feb 10, 2018
8be3068
added conversion from Rust feature to LLVM feature
newpavlov Feb 10, 2018
c97aa09
iterator instead loop
newpavlov Feb 10, 2018
161e8ff
typo: correct endianess to endianness (this also changes function nam…
matthiaskrgr Feb 10, 2018
7c6adb4
fixed errors
newpavlov Feb 11, 2018
22b0489
Add the emptiness condition to the docs; add a PartialOrd example wit…
scottmcm Feb 11, 2018
bf69b0f
Upgrade the Travis CI macOS images for testing from Xcode 8.3 to 9.2.
kennytm Jan 25, 2018
a003cb7
Add test.
jseyfried Feb 9, 2018
c2a31de
Dangling pointer fix
newpavlov Feb 11, 2018
bd426f1
Update ops range example to avoid confusion between indexes and values.
Feb 12, 2018
f7cabc6
Continue parsing function after finding `...` arg
estebank Feb 12, 2018
0f16eee
rustc: Add the ability to not run dsymutil
alexcrichton Jan 26, 2018
43e8ac2
rustc: Persist LLVM's `Linker` in Fat LTO
alexcrichton Feb 12, 2018
4c658f7
Update compiletest's `read2` function
alexcrichton Feb 12, 2018
f237e9e
Remove allocation from width of character function.
Mark-Simulacrum Feb 12, 2018
60f13d9
Rollup merge of #47784 - alexcrichton:less-dsymutil, r=michaelwoerister
kennytm Feb 13, 2018
58da4d5
Rollup merge of #47846 - roblabla:bugfix-ocaml, r=kennytm
kennytm Feb 13, 2018
9cf75c2
Rollup merge of #48033 - GuillaumeGomez:better-char-cast-message, r=e…
kennytm Feb 13, 2018
ab7257d
Rollup merge of #48083 - jseyfried:improve_tuple_struct_field_access_…
kennytm Feb 13, 2018
e44f2ae
Rollup merge of #48087 - scottmcm:range_is_empty, r=kennytm,alexcrichton
kennytm Feb 13, 2018
3cfcdc9
Rollup merge of #48114 - kennytm:xcode9, r=alexcrichton
kennytm Feb 13, 2018
dd2f1f8
Rollup merge of #48126 - newpavlov:patch-1, r=alexcrichton
kennytm Feb 13, 2018
e58347b
Rollup merge of #48130 - ollie27:stab, r=Mark-Simulacrum
kennytm Feb 13, 2018
2deeb06
Rollup merge of #48133 - matthiaskrgr:endianess_to_endianness, r=oli-obk
kennytm Feb 13, 2018
c67b789
Rollup merge of #48151 - echochamber:update_range_example, r=estebank
kennytm Feb 13, 2018
7c3c054
Rollup merge of #48154 - estebank:issue-31481, r=nikomatsakis
kennytm Feb 13, 2018
a6f8eb1
Rollup merge of #48163 - alexcrichton:persistent-linker, r=rkruppe
kennytm Feb 13, 2018
1806b19
Rollup merge of #48165 - alexcrichton:update-read2, r=Mark-Simulacrum
kennytm Feb 13, 2018
5b25477
Rollup merge of #48167 - Mark-Simulacrum:remove-allocation-codemap, r…
kennytm Feb 13, 2018
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
Update ops range example to avoid confusion between indexes and values.
  • Loading branch information
Jason Schein committed Feb 12, 2018
commit bd426f1d69ec8371d86e06382e96e9ed842f3933
10 changes: 5 additions & 5 deletions src/libcore/ops/range.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ impl fmt::Debug for RangeFull {
/// assert_eq!((3..5), std::ops::Range { start: 3, end: 5 });
/// assert_eq!(3 + 4 + 5, (3..6).sum());
///
/// let arr = [0, 1, 2, 3];
/// assert_eq!(arr[ .. ], [0,1,2,3]);
/// assert_eq!(arr[ ..3], [0,1,2 ]);
/// assert_eq!(arr[1.. ], [ 1,2,3]);
/// assert_eq!(arr[1..3], [ 1,2 ]); // Range
/// let arr = ['a', 'b', 'c', 'd'];
/// assert_eq!(arr[ .. ], ['a', 'b', 'c', 'd']);
/// assert_eq!(arr[ ..3], ['a', 'b', 'c', ]);
/// assert_eq!(arr[1.. ], [ 'b', 'c', 'd']);
/// assert_eq!(arr[1..3], [ 'b', 'c' ]); // Range
/// ```
#[derive(Clone, PartialEq, Eq, Hash)] // not Copy -- see #27186
#[stable(feature = "rust1", since = "1.0.0")]
Expand Down