From 15dff84dc3a640be4b6e49f45614c7d1806c8f56 Mon Sep 17 00:00:00 2001 From: Scott McMurray Date: Tue, 30 May 2017 08:40:50 -0700 Subject: [PATCH] Avoid range::step_by in another test --- src/libcollections/tests/lib.rs | 2 +- src/libcollections/tests/vec_deque.rs | 3 ++- src/libcore/tests/iter.rs | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/libcollections/tests/lib.rs b/src/libcollections/tests/lib.rs index cda8c6d59987e..6af5a942bc34f 100644 --- a/src/libcollections/tests/lib.rs +++ b/src/libcollections/tests/lib.rs @@ -16,11 +16,11 @@ #![feature(collections)] #![feature(const_fn)] #![feature(exact_size_is_empty)] +#![feature(iterator_step_by)] #![feature(pattern)] #![feature(placement_in_syntax)] #![feature(rand)] #![feature(splice)] -#![feature(step_by)] #![feature(str_escape)] #![feature(test)] #![feature(unboxed_closures)] diff --git a/src/libcollections/tests/vec_deque.rs b/src/libcollections/tests/vec_deque.rs index f2935c05d4f7a..a992351653d7b 100644 --- a/src/libcollections/tests/vec_deque.rs +++ b/src/libcollections/tests/vec_deque.rs @@ -510,7 +510,8 @@ fn test_from_iter() { let u: Vec<_> = deq.iter().cloned().collect(); assert_eq!(u, v); - let seq = (0..).step_by(2).take(256); + // FIXME #27741: Remove `.skip(0)` when Range::step_by is fully removed + let seq = (0..).skip(0).step_by(2).take(256); let deq: VecDeque<_> = seq.collect(); for (i, &x) in deq.iter().enumerate() { assert_eq!(2 * i, x); diff --git a/src/libcore/tests/iter.rs b/src/libcore/tests/iter.rs index f53365bfb04a0..4f9951cd15399 100644 --- a/src/libcore/tests/iter.rs +++ b/src/libcore/tests/iter.rs @@ -12,8 +12,8 @@ use core::iter::*; use core::{i8, i16, isize}; use core::usize; -// This is here to simplify calling Iterator::step_by. Remove once -// Range::step_by is completely gone (not just deprecated). +// FIXME #27741: This is here to simplify calling Iterator::step_by. Remove +// once Range::step_by is completely gone (not just deprecated). trait IterEx: Sized { fn iter_step_by(self, n: usize) -> StepBy; }