diff options
| author | Alex Burka <alex@alexburka.com> | 2017-09-19 05:40:04 +0000 |
|---|---|---|
| committer | Badel2 <2badel2@gmail.com> | 2017-09-22 22:05:18 +0200 |
| commit | e64efc91f49affb265328e354c8c8f0544daa462 (patch) | |
| tree | ab6832194ec3c23ab7033941b885f164ebc37686 /src/liballoc/tests/string.rs | |
| parent | 3eb19bf9b160825cd338b9419551670a30962c4e (diff) | |
| download | rust-e64efc91f49affb265328e354c8c8f0544daa462.tar.gz rust-e64efc91f49affb265328e354c8c8f0544daa462.zip | |
Add support for `..=` syntax
Add ..= to the parser Add ..= to libproc_macro Add ..= to ICH Highlight ..= in rustdoc Update impl Debug for RangeInclusive to ..= Replace `...` to `..=` in range docs Make the dotdoteq warning point to the ... Add warning for ... in expressions Updated more tests to the ..= syntax Updated even more tests to the ..= syntax Updated the inclusive_range entry in unstable book
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] |
