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/libsyntax/diagnostic_list.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/libsyntax/diagnostic_list.rs')
| -rw-r--r-- | src/libsyntax/diagnostic_list.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsyntax/diagnostic_list.rs b/src/libsyntax/diagnostic_list.rs index b29883670bd..c3cf4747835 100644 --- a/src/libsyntax/diagnostic_list.rs +++ b/src/libsyntax/diagnostic_list.rs @@ -291,7 +291,7 @@ Erroneous code example: fn main() { let tmp = vec![0, 1, 2, 3, 4, 4, 3, 3, 2, 1]; - let x = &tmp[1...]; // error: inclusive range was used with no end + let x = &tmp[1..=]; // error: inclusive range was used with no end } ``` @@ -312,7 +312,7 @@ Or put an end to your inclusive range: fn main() { let tmp = vec![0, 1, 2, 3, 4, 4, 3, 3, 2, 1]; - let x = &tmp[1...3]; // ok! + let x = &tmp[1..=3]; // ok! } ``` "##, |
