Replace ... with ..= in suggestions

As ... is "(silently) deprecated". Presumably this means we should be giving correct, up-to-date suggestions, though.
This commit is contained in:
varkor 2018-05-25 09:47:37 +01:00
parent 1aa749469b
commit 732d638483
2 changed files with 7 additions and 7 deletions

View File

@ -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)

View File

@ -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