diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-01-07 17:26:58 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-01-07 17:26:58 -0800 |
| commit | 6e806bdefde91af102567ef4b5dbd3ccf0c5c2ec (patch) | |
| tree | b8627ad2c80976f618b661ec14695f6a322ad1b3 /src/libcoretest/slice.rs | |
| parent | f6a7dc5528a9a9ac36867bbca2a6044b7be5bce2 (diff) | |
| parent | 7d72719efc25c6cdb8963c187e93df646ba65245 (diff) | |
| download | rust-6e806bdefde91af102567ef4b5dbd3ccf0c5c2ec.tar.gz rust-6e806bdefde91af102567ef4b5dbd3ccf0c5c2ec.zip | |
rollup merge of #20721: japaric/snap
Conflicts: src/libcollections/vec.rs src/libcore/fmt/mod.rs src/librustc/lint/builtin.rs src/librustc/session/config.rs src/librustc_trans/trans/base.rs src/librustc_trans/trans/context.rs src/librustc_trans/trans/type_.rs src/librustc_typeck/check/_match.rs src/librustdoc/html/format.rs src/libsyntax/std_inject.rs src/libsyntax/util/interner.rs src/test/compile-fail/mut-pattern-mismatched.rs
Diffstat (limited to 'src/libcoretest/slice.rs')
| -rw-r--r-- | src/libcoretest/slice.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libcoretest/slice.rs b/src/libcoretest/slice.rs index b714b6a4e41..6fae384763f 100644 --- a/src/libcoretest/slice.rs +++ b/src/libcoretest/slice.rs @@ -57,17 +57,17 @@ fn iterator_to_slice() { } { let mut iter = data.iter_mut(); - assert_eq!(iter.index(&FullRange), other_data.index(&FullRange)); + assert_eq!(&iter[], &other_data[]); // mutability: assert!(&mut iter[] == other_data); iter.next(); - assert_eq!(iter.index(&FullRange), other_data.index(&(1..))); + assert_eq!(&iter[], &other_data[1..]); assert!(&mut iter[] == &mut other_data[1..]); iter.next_back(); - assert_eq!(iter.index(&FullRange), other_data.index(&(1..2))); + assert_eq!(&iter[], &other_data[1..2]); assert!(&mut iter[] == &mut other_data[1..2]); let s = iter.into_slice(); |
