diff options
| author | bors <bors@rust-lang.org> | 2017-09-27 16:04:31 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-09-27 16:04:31 +0000 |
| commit | 0e6f4cf51cd3b799fb057956f8e733d16605d09b (patch) | |
| tree | 56ff7787ca8fa8b1282782c5b14546d7a27870ef /src/liballoc/tests/string.rs | |
| parent | 1fd3a42c624faf91e9402942419ec409699fb94a (diff) | |
| parent | 5102309b1ff63660309dead2e39ff9a9b554799a (diff) | |
| download | rust-0e6f4cf51cd3b799fb057956f8e733d16605d09b.tar.gz rust-0e6f4cf51cd3b799fb057956f8e733d16605d09b.zip | |
Auto merge of #44709 - Badel2:inclusive-range-dotdoteq, r=petrochenkov
Initial support for `..=` syntax #28237 This PR adds `..=` as a synonym for `...` in patterns and expressions. Since `...` in expressions was never stable, we now issue a warning. cc @durka r? @aturon
Diffstat (limited to 'src/liballoc/tests/string.rs')
| -rw-r--r-- | src/liballoc/tests/string.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/liballoc/tests/string.rs b/src/liballoc/tests/string.rs index 6aba18ddf49..ef6f5e10a72 100644 --- a/src/liballoc/tests/string.rs +++ b/src/liballoc/tests/string.rs @@ -456,9 +456,9 @@ fn test_splice_char_boundary() { #[test] fn test_splice_inclusive_range() { let mut v = String::from("12345"); - v.splice(2...3, "789"); + v.splice(2..=3, "789"); assert_eq!(v, "127895"); - v.splice(1...2, "A"); + v.splice(1..=2, "A"); assert_eq!(v, "1A895"); } @@ -473,7 +473,7 @@ fn test_splice_out_of_bounds() { #[should_panic] fn test_splice_inclusive_out_of_bounds() { let mut s = String::from("12345"); - s.splice(5...5, "789"); + s.splice(5..=5, "789"); } #[test] |
