diff options
| author | bors <bors@rust-lang.org> | 2014-11-17 11:22:00 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-11-17 11:22:00 +0000 |
| commit | 0047dbe59c41b951d34ce6324f3a8c0e15d523e9 (patch) | |
| tree | e4f717adb4830ca6e737a23c81abbab3bb3a80b5 /src/libcoretest/iter.rs | |
| parent | edfb83c9e28df2a8f326d688f3d5b1f6faa72db8 (diff) | |
| parent | ca08540a0039e827114752d11166ea8cb1387068 (diff) | |
| download | rust-0047dbe59c41b951d34ce6324f3a8c0e15d523e9.tar.gz rust-0047dbe59c41b951d34ce6324f3a8c0e15d523e9.zip | |
auto merge of #19027 : nick29581/rust/coercions-4, r=alexcrichton
The forwards compatible parts of #18645, rebased. Converts implicit coercions from `[T, ..n]` to `&[T]` into explicit references.
Diffstat (limited to 'src/libcoretest/iter.rs')
| -rw-r--r-- | src/libcoretest/iter.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libcoretest/iter.rs b/src/libcoretest/iter.rs index 7764fb26c11..32aff498ba1 100644 --- a/src/libcoretest/iter.rs +++ b/src/libcoretest/iter.rs @@ -627,7 +627,7 @@ fn test_random_access_zip() { #[test] fn test_random_access_take() { let xs = [1i, 2, 3, 4, 5]; - let empty: &[int] = []; + let empty: &[int] = &[]; check_randacc_iter(xs.iter().take(3), 3); check_randacc_iter(xs.iter().take(20), xs.len()); check_randacc_iter(xs.iter().take(0), 0); @@ -637,7 +637,7 @@ fn test_random_access_take() { #[test] fn test_random_access_skip() { let xs = [1i, 2, 3, 4, 5]; - let empty: &[int] = []; + let empty: &[int] = &[]; check_randacc_iter(xs.iter().skip(2), xs.len() - 2); check_randacc_iter(empty.iter().skip(2), 0); } @@ -669,7 +669,7 @@ fn test_random_access_map() { #[test] fn test_random_access_cycle() { let xs = [1i, 2, 3, 4, 5]; - let empty: &[int] = []; + let empty: &[int] = &[]; check_randacc_iter(xs.iter().cycle().take(27), 27); check_randacc_iter(empty.iter().cycle(), 0); } |
