File tree Expand file tree Collapse file tree 2 files changed +17
-8
lines changed Expand file tree Collapse file tree 2 files changed +17
-8
lines changed Original file line number Diff line number Diff line change @@ -88,20 +88,17 @@ fn overlapping() {
8888 _ => ( ) ,
8989 }
9090
91- /*
92- // FIXME(JohnTitor): uncomment this once rustfmt knows half-open patterns
9391 match 42 {
94- 0 .. => println!("0 .. 42 "),
95- 3 .. => println!("3 .. 42 "),
92+ 3 .. => println ! ( "3.. " ) ,
93+ 0 .. => println ! ( "0.. " ) ,
9694 _ => ( ) ,
9795 }
9896
9997 match 42 {
100- ..=23 => println!("0 ... 23"),
101- ..26 => println!("0 .. 26"),
98+ ..=23 => println ! ( "..= 23" ) ,
99+ ..26 => println ! ( ".. 26" ) ,
102100 _ => ( ) ,
103101 }
104- */
105102
106103 if let None = Some ( 42 ) {
107104 // nothing
Original file line number Diff line number Diff line change @@ -59,5 +59,17 @@ note: overlaps with this
5959LL | 0..=10 => println!("0..=10"),
6060 | ^^^^^^
6161
62- error: aborting due to 5 previous errors
62+ error: some ranges overlap
63+ --> $DIR/match_overlapping_arm.rs:98:9
64+ |
65+ LL | ..=23 => println!("..=23"),
66+ | ^^^^^
67+ |
68+ note: overlaps with this
69+ --> $DIR/match_overlapping_arm.rs:99:9
70+ |
71+ LL | ..26 => println!("..26"),
72+ | ^^^^
73+
74+ error: aborting due to 6 previous errors
6375
You can’t perform that action at this time.
0 commit comments