]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #49163 - SimonSapin:range-bounds, r=alexcrichton
authorbors <bors@rust-lang.org>
Thu, 29 Mar 2018 11:34:17 +0000 (11:34 +0000)
committerbors <bors@rust-lang.org>
Thu, 29 Mar 2018 11:34:17 +0000 (11:34 +0000)
Rename RangeArgument to RangeBounds, move it and Bound to libcore

As proposed in the tracking issue: https://github.com/rust-lang/rust/issues/30877

Changes to *stable* items:

* `core::ops::Bound` / `std::ops::Bound` is new
* `std::collections::Bound` is a deprecated reexport of it (does this actually cause a warning?)

Changes to *unstable* items

* `alloc::Bound` is gone
* `alloc::range::RangeArgument` is moved to `core::ops::RangeBounds` / `std::ops::RangeBounds`
* `alloc::range` is gone
* `std::collections::range::RangeArgument` is deprecated reexport, to be removed later
* `std::collections::range` is deprecated, to be removed later
* `impl RangeBounds<T> for Range{,From,To,Inclusive,ToInclusive}<&T>` are added

The idea of replacing this trait with a type to be used with `Into<_>` is left for future consideration / work.

(Fixes https://github.com/rust-lang-nursery/rust-clippy/issues/2552.)


Trivial merge