mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-30 14:52:56 +03:00
b7bdc7aee2
As discussed, make this portion of the range API unstable again. This
will now be tracked under `new_range_remainder`.
Discussion: https://rust-lang.zulipchat.com/#narrow/channel/327149-t-libs-api.2Fapi-changes/topic/.60RangeFrom.3A.3Aremainder.60.20possible.20panic/with/582108913
(cherry picked from commit cbc94349d0)
29 lines
562 B
Rust
29 lines
562 B
Rust
// Stable
|
|
|
|
use std::range::{RangeInclusive, RangeInclusiveIter};
|
|
|
|
fn range_inclusive(mut r: RangeInclusive<usize>) {
|
|
r.start;
|
|
r.last;
|
|
r.contains(&5);
|
|
r.is_empty();
|
|
r.iter();
|
|
|
|
let mut i = r.into_iter();
|
|
i.next();
|
|
i.remainder(); //~ ERROR unstable
|
|
}
|
|
|
|
// Unstable module
|
|
|
|
use std::range::legacy; //~ ERROR unstable
|
|
|
|
// Unstable types
|
|
|
|
use std::range::RangeFrom; //~ ERROR unstable
|
|
use std::range::Range; //~ ERROR unstable
|
|
use std::range::RangeFromIter; //~ ERROR unstable
|
|
use std::range::RangeIter; //~ ERROR unstable
|
|
|
|
fn main() {}
|