about summary refs log tree commit diff
diff options
context:
space:
mode:
authorvarkor <github@varkor.com>2018-05-25 09:47:37 +0100
committervarkor <github@varkor.com>2018-08-16 20:09:05 +0100
commit732d63848302156d475beb7159e73c14c0570e3a (patch)
treef3f46794031b260f1fb577bfbe0a42a8ebdb29d4
parent1aa749469bfc57ae023be6fbb1141b806bcb3d62 (diff)
downloadrust-732d63848302156d475beb7159e73c14c0570e3a.tar.gz
rust-732d63848302156d475beb7159e73c14c0570e3a.zip
Replace ... with ..= in suggestions
As ... is "(silently) deprecated". Presumably this means we should be giving correct, up-to-date suggestions, though.
-rw-r--r--src/librustc_mir/hair/pattern/mod.rs2
-rw-r--r--src/test/ui/exhaustive_integer_patterns.stderr12
2 files changed, 7 insertions, 7 deletions
diff --git a/src/librustc_mir/hair/pattern/mod.rs b/src/librustc_mir/hair/pattern/mod.rs
index 6e56db69a82..9bf7aa24ae6 100644
--- a/src/librustc_mir/hair/pattern/mod.rs
+++ b/src/librustc_mir/hair/pattern/mod.rs
@@ -233,7 +233,7 @@ impl<'tcx> fmt::Display for Pattern<'tcx> {
             PatternKind::Range { lo, hi, end } => {
                 fmt_const_val(f, lo)?;
                 match end {
-                    RangeEnd::Included => write!(f, "...")?,
+                    RangeEnd::Included => write!(f, "..=")?,
                     RangeEnd::Excluded => write!(f, "..")?,
                 }
                 fmt_const_val(f, hi)
diff --git a/src/test/ui/exhaustive_integer_patterns.stderr b/src/test/ui/exhaustive_integer_patterns.stderr
index 3d308a9e5d1..0f7ab8688c6 100644
--- a/src/test/ui/exhaustive_integer_patterns.stderr
+++ b/src/test/ui/exhaustive_integer_patterns.stderr
@@ -10,17 +10,17 @@ note: lint level defined here
 LL | #![deny(unreachable_patterns)]
    |         ^^^^^^^^^^^^^^^^^^^^
 
-error[E0004]: non-exhaustive patterns: `128u8...255u8` not covered
+error[E0004]: non-exhaustive patterns: `128u8..=255u8` not covered
   --> $DIR/exhaustive_integer_patterns.rs:37:11
    |
 LL |     match x { //~ ERROR non-exhaustive patterns
-   |           ^ pattern `128u8...255u8` not covered
+   |           ^ pattern `128u8..=255u8` not covered
 
-error[E0004]: non-exhaustive patterns: `11u8...19u8`, `31u8...34u8`, `36u8...69u8` and 1 more not covered
+error[E0004]: non-exhaustive patterns: `11u8..=19u8`, `31u8..=34u8`, `36u8..=69u8` and 1 more not covered
   --> $DIR/exhaustive_integer_patterns.rs:42:11
    |
 LL |     match x { //~ ERROR non-exhaustive patterns
-   |           ^ patterns `11u8...19u8`, `31u8...34u8`, `36u8...69u8` and 1 more not covered
+   |           ^ patterns `11u8..=19u8`, `31u8..=34u8`, `36u8..=69u8` and 1 more not covered
 
 error: unreachable pattern
   --> $DIR/exhaustive_integer_patterns.rs:53:9
@@ -28,11 +28,11 @@ error: unreachable pattern
 LL |         -2..=20 => {} //~ ERROR unreachable pattern
    |         ^^^^^^^
 
-error[E0004]: non-exhaustive patterns: `-128i8...-8i8`, `-6i8`, `121i8...124i8` and 1 more not covered
+error[E0004]: non-exhaustive patterns: `-128i8..=-8i8`, `-6i8`, `121i8..=124i8` and 1 more not covered
   --> $DIR/exhaustive_integer_patterns.rs:50:11
    |
 LL |     match x { //~ ERROR non-exhaustive patterns
-   |           ^ patterns `-128i8...-8i8`, `-6i8`, `121i8...124i8` and 1 more not covered
+   |           ^ patterns `-128i8..=-8i8`, `-6i8`, `121i8..=124i8` and 1 more not covered
 
 error[E0004]: non-exhaustive patterns: `-128i8` not covered
   --> $DIR/exhaustive_integer_patterns.rs:99:11