rust/src/libcore
bors 8484831d29 Auto merge of #30884 - durka:inclusive-ranges, r=aturon
This PR implements [RFC 1192](https://github.com/rust-lang/rfcs/blob/master/text/1192-inclusive-ranges.md), which is triple-dot syntax for inclusive range expressions. The new stuff is behind two feature gates (one for the syntax and one for the std::ops types). This replaces the deprecated functionality in std::iter. Along the way I simplified the desugaring for all ranges.

This is my first contribution to rust which changes more than one character outside of a test or comment, so please review carefully! Some of the individual commit messages have more of my notes. Also thanks for putting up with my dumb questions in #rust-internals.

- For implementing `std::ops::RangeInclusive`, I took @Stebalien's suggestion from https://github.com/rust-lang/rfcs/pull/1192#issuecomment-137864421. It seemed to me to make the implementation easier and increase type safety. If that stands, the RFC should be amended to avoid confusion.
- I also kind of like @glaebhoerl's [idea](https://github.com/rust-lang/rfcs/pull/1254#issuecomment-147815299), which is unified inclusive/exclusive range syntax something like `x>..=y`. We can experiment with this while everything is behind a feature gate.
- There are a couple of FIXMEs left (see the last commit). I didn't know what to do about `RangeArgument` and I haven't added `Index` impls yet. Those should be discussed/finished before merging.

cc @Gankro since you [complained](https://www.reddit.com/r/rust/comments/3xkfro/what_happened_to_inclusive_ranges/cy5j0yq)
cc #27777 #30877 rust-lang/rust#1192 rust-lang/rfcs#1254
relevant to #28237 (tracking issue)
2016-03-06 07:16:41 +00:00
..
fmt fmt: Make sure write_fmt's implementation can use write_char 2016-02-17 22:26:44 +01:00
hash doc: insert missing chars 2016-01-27 20:56:18 +02:00
num Rollup merge of #31965 - miqid:doc, r=steveklabnik 2016-03-01 13:39:41 -05:00
prelude Add missing annotations and some tests 2015-11-18 01:24:21 +03:00
str Auto merge of #30884 - durka:inclusive-ranges, r=aturon 2016-03-06 07:16:41 +00:00
sync Add compare_exchange and compare_exchange_weak to atomic types 2016-02-18 22:38:25 +00:00
any.rs Implement Any for unsized types 2016-01-14 23:02:32 -08:00
array.rs Fix broken links for core primitives 2016-03-01 20:44:48 +08:00
borrow.rs Move the Borrow and BorrowMut traits to libcore. 2015-08-22 13:58:39 +02:00
Cargo.toml bootstrap: Add a bunch of Cargo.toml files 2016-02-11 11:12:32 -08:00
cell.rs Explicitly opt out of Sync for cell and mpsc types 2016-03-01 18:51:46 -05:00
char.rs Auto merge of #30624 - Ticki:specialization, r=alexcrichton 2016-01-16 21:38:39 +00:00
clone.rs Make note about traits that can be derived 2015-11-16 18:50:40 -05:00
cmp.rs Clarifying behavior of #[derive(Ord, PartialOrd)] in doc comments. 2016-02-09 08:01:28 -07:00
convert.rs Minor spelling fixes 2016-02-09 11:52:39 -05:00
default.rs libcore: deny warnings in doctests 2015-11-12 05:16:08 +00:00
intrinsics.rs std: Stabilize APIs for the 1.8 release 2016-02-29 09:05:33 -08:00
iter.rs Auto merge of #30884 - durka:inclusive-ranges, r=aturon 2016-03-06 07:16:41 +00:00
lib.rs mk: Move from -D warnings to #![deny(warnings)] 2016-01-24 20:35:55 -08:00
macros.rs Correct the documentation of debug_assert_eq 2015-12-29 11:01:35 -05:00
marker.rs Fix spacing style of T: Bound in docs 2016-01-17 23:44:33 +01:00
mem.rs Improve 'std::mem::transmute_copy' doc example. 2016-02-16 21:48:50 -05:00
nonzero.rs Register new snapshots 2015-12-21 09:26:21 -08:00
ops.rs Auto merge of #30884 - durka:inclusive-ranges, r=aturon 2016-03-06 07:16:41 +00:00
option.rs Register new snapshots 2016-02-23 07:31:16 -08:00
panicking.rs Mark all extern functions as nounwind 2015-09-14 11:36:09 +02:00
ptr.rs Rollup merge of #31965 - miqid:doc, r=steveklabnik 2016-03-01 13:39:41 -05:00
raw.rs Correct spelling in docs 2015-10-13 09:44:11 -04:00
result.rs Register new snapshots 2016-02-23 07:31:16 -08:00
slice.rs Auto merge of #30884 - durka:inclusive-ranges, r=aturon 2016-03-06 07:16:41 +00:00
tuple.rs Properly document tuples 2016-02-09 16:00:50 -05:00