diff options
| author | bors <bors@rust-lang.org> | 2015-01-14 04:42:01 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-01-14 04:42:01 +0000 |
| commit | 3614e1de6cf7abc7754c23f93476bef0e2625e99 (patch) | |
| tree | e36aa17f7450d9f0007d7278e244ba6d8127b5cf /src/test | |
| parent | 170c4399e614fe599c3d41306b3429ca8b3b68c6 (diff) | |
| parent | c1d48a85082cfe3683ad9eda5223d3259d4fa718 (diff) | |
| download | rust-3614e1de6cf7abc7754c23f93476bef0e2625e99.tar.gz rust-3614e1de6cf7abc7754c23f93476bef0e2625e99.zip | |
auto merge of #21061 : japaric/rust/range, r=nick29581
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/bench/shootout-fasta-redux.rs | 4 | ||||
| -rw-r--r-- | src/test/run-pass/issue-17503.rs | 2 | ||||
| -rw-r--r-- | src/test/run-pass/issue-8898.rs | 2 | ||||
| -rw-r--r-- | src/test/run-pass/slice-2.rs | 4 |
4 files changed, 6 insertions, 6 deletions
diff --git a/src/test/bench/shootout-fasta-redux.rs b/src/test/bench/shootout-fasta-redux.rs index 5a47f9fbc57..9e5618579e4 100644 --- a/src/test/bench/shootout-fasta-redux.rs +++ b/src/test/bench/shootout-fasta-redux.rs @@ -128,7 +128,7 @@ impl<'a, W: Writer> RepeatFasta<'a, W> { copy_memory(buf.as_mut_slice(), alu); let buf_len = buf.len(); copy_memory(buf.slice_mut(alu_len, buf_len), - &alu[0..LINE_LEN]); + &alu[..LINE_LEN]); let mut pos = 0; let mut bytes; @@ -204,7 +204,7 @@ impl<'a, W: Writer> RandomFasta<'a, W> { for i in range(0u, chars_left) { buf[i] = self.nextc(); } - self.out.write(&buf[0..chars_left]) + self.out.write(&buf[..chars_left]) } } diff --git a/src/test/run-pass/issue-17503.rs b/src/test/run-pass/issue-17503.rs index 65bf088786e..a071224999b 100644 --- a/src/test/run-pass/issue-17503.rs +++ b/src/test/run-pass/issue-17503.rs @@ -13,7 +13,7 @@ fn main() { let ss: &&[int] = &s; let sss: &&&[int] = &ss; - println!("{:?}", &s[0..3]); + println!("{:?}", &s[..3]); println!("{:?}", &ss[3..]); println!("{:?}", &sss[2..4]); } diff --git a/src/test/run-pass/issue-8898.rs b/src/test/run-pass/issue-8898.rs index 42739628eed..f845db9c421 100644 --- a/src/test/run-pass/issue-8898.rs +++ b/src/test/run-pass/issue-8898.rs @@ -16,7 +16,7 @@ pub fn main() { let abc = [1i, 2, 3]; let tf = [true, false]; let x = [(), ()]; - let slice = &x[0..1]; + let slice = &x[..1]; assert_repr_eq(&abc[], "[1i, 2i, 3i]".to_string()); assert_repr_eq(&tf[], "[true, false]".to_string()); diff --git a/src/test/run-pass/slice-2.rs b/src/test/run-pass/slice-2.rs index 8f031d2e97e..43e517404cb 100644 --- a/src/test/run-pass/slice-2.rs +++ b/src/test/run-pass/slice-2.rs @@ -17,7 +17,7 @@ fn main() { let cmp: &[int] = &[3, 4, 5]; assert!(&x[2..] == cmp); let cmp: &[int] = &[1, 2, 3]; - assert!(&x[0..3] == cmp); + assert!(&x[..3] == cmp); let cmp: &[int] = &[2, 3, 4]; assert!(&x[1..4] == cmp); @@ -27,7 +27,7 @@ fn main() { let cmp: &[int] = &[3, 4, 5]; assert!(&x[2..] == cmp); let cmp: &[int] = &[1, 2, 3]; - assert!(&x[0..3] == cmp); + assert!(&x[..3] == cmp); let cmp: &[int] = &[2, 3, 4]; assert!(&x[1..4] == cmp); |
