Skip to content

Commit 732d638

Browse files
committed
Replace ... with ..= in suggestions
As ... is "(silently) deprecated". Presumably this means we should be giving correct, up-to-date suggestions, though.
1 parent 1aa7494 commit 732d638

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/librustc_mir/hair/pattern/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ impl<'tcx> fmt::Display for Pattern<'tcx> {
233233
PatternKind::Range { lo, hi, end } => {
234234
fmt_const_val(f, lo)?;
235235
match end {
236-
RangeEnd::Included => write!(f, "...")?,
236+
RangeEnd::Included => write!(f, "..=")?,
237237
RangeEnd::Excluded => write!(f, "..")?,
238238
}
239239
fmt_const_val(f, hi)

src/test/ui/exhaustive_integer_patterns.stderr

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,29 +10,29 @@ note: lint level defined here
1010
LL | #![deny(unreachable_patterns)]
1111
| ^^^^^^^^^^^^^^^^^^^^
1212

13-
error[E0004]: non-exhaustive patterns: `128u8...255u8` not covered
13+
error[E0004]: non-exhaustive patterns: `128u8..=255u8` not covered
1414
--> $DIR/exhaustive_integer_patterns.rs:37:11
1515
|
1616
LL | match x { //~ ERROR non-exhaustive patterns
17-
| ^ pattern `128u8...255u8` not covered
17+
| ^ pattern `128u8..=255u8` not covered
1818

19-
error[E0004]: non-exhaustive patterns: `11u8...19u8`, `31u8...34u8`, `36u8...69u8` and 1 more not covered
19+
error[E0004]: non-exhaustive patterns: `11u8..=19u8`, `31u8..=34u8`, `36u8..=69u8` and 1 more not covered
2020
--> $DIR/exhaustive_integer_patterns.rs:42:11
2121
|
2222
LL | match x { //~ ERROR non-exhaustive patterns
23-
| ^ patterns `11u8...19u8`, `31u8...34u8`, `36u8...69u8` and 1 more not covered
23+
| ^ patterns `11u8..=19u8`, `31u8..=34u8`, `36u8..=69u8` and 1 more not covered
2424

2525
error: unreachable pattern
2626
--> $DIR/exhaustive_integer_patterns.rs:53:9
2727
|
2828
LL | -2..=20 => {} //~ ERROR unreachable pattern
2929
| ^^^^^^^
3030

31-
error[E0004]: non-exhaustive patterns: `-128i8...-8i8`, `-6i8`, `121i8...124i8` and 1 more not covered
31+
error[E0004]: non-exhaustive patterns: `-128i8..=-8i8`, `-6i8`, `121i8..=124i8` and 1 more not covered
3232
--> $DIR/exhaustive_integer_patterns.rs:50:11
3333
|
3434
LL | match x { //~ ERROR non-exhaustive patterns
35-
| ^ patterns `-128i8...-8i8`, `-6i8`, `121i8...124i8` and 1 more not covered
35+
| ^ patterns `-128i8..=-8i8`, `-6i8`, `121i8..=124i8` and 1 more not covered
3636

3737
error[E0004]: non-exhaustive patterns: `-128i8` not covered
3838
--> $DIR/exhaustive_integer_patterns.rs:99:11

0 commit comments

Comments
 (0)