When finding a match expr with a single arm that requires more, suggest it

Given

```rust
match Some(42) {
    Some(0) => {}
}
```

suggest

```rust
match Some(42) {
    Some(0) => {}
    None | Some(_) => todo!(),
}
```
This commit is contained in:
Esteban Kuber 2021-12-16 02:14:17 +00:00
parent 02a3830f24
commit 2383858f34
31 changed files with 805 additions and 159 deletions

View file

@ -589,6 +589,21 @@ fn non_exhaustive_match<'p, 'tcx>(
),
));
}
[only] => {
let pre_indentation = if let (Some(snippet), true) = (
sm.indentation_before(only.span),
sm.is_multiline(sp.shrink_to_hi().with_hi(only.span.lo())),
) {
format!("\n{}", snippet)
} else {
" ".to_string()
};
let comma = if matches!(only.body.kind, hir::ExprKind::Block(..)) { "" } else { "," };
suggestion = Some((
only.span.shrink_to_hi(),
format!("{}{}{} => todo!()", comma, pre_indentation, pattern),
));
}
_ => {}
}

View file

@ -8,7 +8,11 @@ LL | move |i| match msg_type {
| ^^^^^^^^ patterns `Opcode(0_u8)` and `Opcode(2_u8..=u8::MAX)` not covered
|
= note: the matched value is of type `Opcode`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ Opcode::OP1 => unimplemented!(),
LL ~ Opcode(0_u8) | Opcode(2_u8..=u8::MAX) => todo!(),
|
error[E0004]: non-exhaustive patterns: `Opcode2(Opcode(0_u8))` and `Opcode2(Opcode(2_u8..=u8::MAX))` not covered
--> $DIR/issue-88331.rs:27:20
@ -20,7 +24,11 @@ LL | move |i| match msg_type {
| ^^^^^^^^ patterns `Opcode2(Opcode(0_u8))` and `Opcode2(Opcode(2_u8..=u8::MAX))` not covered
|
= note: the matched value is of type `Opcode2`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ Opcode2::OP2=> unimplemented!(),
LL ~ Opcode2(Opcode(0_u8)) | Opcode2(Opcode(2_u8..=u8::MAX)) => todo!(),
|
error: aborting due to 2 previous errors

View file

@ -11,7 +11,10 @@ LL | let _b = || { match l1 { L1::A => () } };
| ^^ pattern `B` not covered
|
= note: the matched value is of type `L1`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL | let _b = || { match l1 { L1::A => (), B => todo!() } };
| ++++++++++++++
error[E0004]: non-exhaustive patterns: type `E1` is non-empty
--> $DIR/non-exhaustive-match.rs:37:25

View file

@ -12,7 +12,11 @@ LL | match x {
| ^ pattern `HastaLaVistaBaby` not covered
|
= note: the matched value is of type `Terminator`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ Terminator::TalkToMyHand => {}
LL + HastaLaVistaBaby => todo!()
|
error: aborting due to previous error

View file

@ -7,7 +7,11 @@ LL | match 0usize {
= note: the matched value is of type `usize`
= note: `usize` does not have a fixed maximum value, so a wildcard `_` is necessary to match exhaustively
= help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `usize` matching
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ 0..=usize::MAX => {}
LL + _ => todo!()
|
error[E0004]: non-exhaustive patterns: `_` not covered
--> $DIR/feature-gate-precise_pointer_size_matching.rs:10:11
@ -18,7 +22,11 @@ LL | match 0isize {
= note: the matched value is of type `isize`
= note: `isize` does not have a fixed maximum value, so a wildcard `_` is necessary to match exhaustively
= help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `isize` matching
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ isize::MIN..=isize::MAX => {}
LL + _ => todo!()
|
error: aborting due to 2 previous errors

View file

@ -5,7 +5,11 @@ LL | m!(0f32, f32::NEG_INFINITY..);
| ^^^^ pattern `_` not covered
|
= note: the matched value is of type `f32`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ _ => todo!() }
|
error[E0004]: non-exhaustive patterns: `_` not covered
--> $DIR/half-open-range-pats-exhaustive-fail.rs:17:8
@ -14,7 +18,11 @@ LL | m!(0f32, ..f32::INFINITY);
| ^^^^ pattern `_` not covered
|
= note: the matched value is of type `f32`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ _ => todo!() }
|
error[E0004]: non-exhaustive patterns: `'\u{10ffff}'` not covered
--> $DIR/half-open-range-pats-exhaustive-fail.rs:26:8
@ -23,7 +31,11 @@ LL | m!('a', ..core::char::MAX);
| ^^^ pattern `'\u{10ffff}'` not covered
|
= note: the matched value is of type `char`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ '\u{10ffff}' => todo!() }
|
error[E0004]: non-exhaustive patterns: `'\u{10fffe}'..='\u{10ffff}'` not covered
--> $DIR/half-open-range-pats-exhaustive-fail.rs:27:8
@ -32,7 +44,11 @@ LL | m!('a', ..ALMOST_MAX);
| ^^^ pattern `'\u{10fffe}'..='\u{10ffff}'` not covered
|
= note: the matched value is of type `char`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ '\u{10fffe}'..='\u{10ffff}' => todo!() }
|
error[E0004]: non-exhaustive patterns: `'\u{0}'` not covered
--> $DIR/half-open-range-pats-exhaustive-fail.rs:28:8
@ -41,7 +57,11 @@ LL | m!('a', ALMOST_MIN..);
| ^^^ pattern `'\u{0}'` not covered
|
= note: the matched value is of type `char`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ '\u{0}' => todo!() }
|
error[E0004]: non-exhaustive patterns: `'\u{10ffff}'` not covered
--> $DIR/half-open-range-pats-exhaustive-fail.rs:29:8
@ -50,7 +70,11 @@ LL | m!('a', ..=ALMOST_MAX);
| ^^^ pattern `'\u{10ffff}'` not covered
|
= note: the matched value is of type `char`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ '\u{10ffff}' => todo!() }
|
error[E0004]: non-exhaustive patterns: `'b'` not covered
--> $DIR/half-open-range-pats-exhaustive-fail.rs:30:8
@ -59,7 +83,11 @@ LL | m!('a', ..=VAL | VAL_2..);
| ^^^ pattern `'b'` not covered
|
= note: the matched value is of type `char`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ 'b' => todo!() }
|
error[E0004]: non-exhaustive patterns: `'b'` not covered
--> $DIR/half-open-range-pats-exhaustive-fail.rs:31:8
@ -68,7 +96,11 @@ LL | m!('a', ..VAL_1 | VAL_2..);
| ^^^ pattern `'b'` not covered
|
= note: the matched value is of type `char`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ 'b' => todo!() }
|
error[E0004]: non-exhaustive patterns: `u8::MAX` not covered
--> $DIR/half-open-range-pats-exhaustive-fail.rs:41:12
@ -77,7 +109,11 @@ LL | m!(0, ..u8::MAX);
| ^ pattern `u8::MAX` not covered
|
= note: the matched value is of type `u8`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ u8::MAX => todo!() }
|
error[E0004]: non-exhaustive patterns: `254_u8..=u8::MAX` not covered
--> $DIR/half-open-range-pats-exhaustive-fail.rs:42:12
@ -86,7 +122,11 @@ LL | m!(0, ..ALMOST_MAX);
| ^ pattern `254_u8..=u8::MAX` not covered
|
= note: the matched value is of type `u8`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ 254_u8..=u8::MAX => todo!() }
|
error[E0004]: non-exhaustive patterns: `0_u8` not covered
--> $DIR/half-open-range-pats-exhaustive-fail.rs:43:12
@ -95,7 +135,11 @@ LL | m!(0, ALMOST_MIN..);
| ^ pattern `0_u8` not covered
|
= note: the matched value is of type `u8`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ 0_u8 => todo!() }
|
error[E0004]: non-exhaustive patterns: `u8::MAX` not covered
--> $DIR/half-open-range-pats-exhaustive-fail.rs:44:12
@ -104,7 +148,11 @@ LL | m!(0, ..=ALMOST_MAX);
| ^ pattern `u8::MAX` not covered
|
= note: the matched value is of type `u8`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ u8::MAX => todo!() }
|
error[E0004]: non-exhaustive patterns: `43_u8` not covered
--> $DIR/half-open-range-pats-exhaustive-fail.rs:45:12
@ -113,7 +161,11 @@ LL | m!(0, ..=VAL | VAL_2..);
| ^ pattern `43_u8` not covered
|
= note: the matched value is of type `u8`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ 43_u8 => todo!() }
|
error[E0004]: non-exhaustive patterns: `43_u8` not covered
--> $DIR/half-open-range-pats-exhaustive-fail.rs:46:12
@ -122,7 +174,11 @@ LL | m!(0, ..VAL_1 | VAL_2..);
| ^ pattern `43_u8` not covered
|
= note: the matched value is of type `u8`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ 43_u8 => todo!() }
|
error[E0004]: non-exhaustive patterns: `u16::MAX` not covered
--> $DIR/half-open-range-pats-exhaustive-fail.rs:54:12
@ -131,7 +187,11 @@ LL | m!(0, ..u16::MAX);
| ^ pattern `u16::MAX` not covered
|
= note: the matched value is of type `u16`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ u16::MAX => todo!() }
|
error[E0004]: non-exhaustive patterns: `65534_u16..=u16::MAX` not covered
--> $DIR/half-open-range-pats-exhaustive-fail.rs:55:12
@ -140,7 +200,11 @@ LL | m!(0, ..ALMOST_MAX);
| ^ pattern `65534_u16..=u16::MAX` not covered
|
= note: the matched value is of type `u16`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ 65534_u16..=u16::MAX => todo!() }
|
error[E0004]: non-exhaustive patterns: `0_u16` not covered
--> $DIR/half-open-range-pats-exhaustive-fail.rs:56:12
@ -149,7 +213,11 @@ LL | m!(0, ALMOST_MIN..);
| ^ pattern `0_u16` not covered
|
= note: the matched value is of type `u16`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ 0_u16 => todo!() }
|
error[E0004]: non-exhaustive patterns: `u16::MAX` not covered
--> $DIR/half-open-range-pats-exhaustive-fail.rs:57:12
@ -158,7 +226,11 @@ LL | m!(0, ..=ALMOST_MAX);
| ^ pattern `u16::MAX` not covered
|
= note: the matched value is of type `u16`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ u16::MAX => todo!() }
|
error[E0004]: non-exhaustive patterns: `43_u16` not covered
--> $DIR/half-open-range-pats-exhaustive-fail.rs:58:12
@ -167,7 +239,11 @@ LL | m!(0, ..=VAL | VAL_2..);
| ^ pattern `43_u16` not covered
|
= note: the matched value is of type `u16`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ 43_u16 => todo!() }
|
error[E0004]: non-exhaustive patterns: `43_u16` not covered
--> $DIR/half-open-range-pats-exhaustive-fail.rs:59:12
@ -176,7 +252,11 @@ LL | m!(0, ..VAL_1 | VAL_2..);
| ^ pattern `43_u16` not covered
|
= note: the matched value is of type `u16`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ 43_u16 => todo!() }
|
error[E0004]: non-exhaustive patterns: `u32::MAX` not covered
--> $DIR/half-open-range-pats-exhaustive-fail.rs:67:12
@ -185,7 +265,11 @@ LL | m!(0, ..u32::MAX);
| ^ pattern `u32::MAX` not covered
|
= note: the matched value is of type `u32`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ u32::MAX => todo!() }
|
error[E0004]: non-exhaustive patterns: `4294967294_u32..=u32::MAX` not covered
--> $DIR/half-open-range-pats-exhaustive-fail.rs:68:12
@ -194,7 +278,11 @@ LL | m!(0, ..ALMOST_MAX);
| ^ pattern `4294967294_u32..=u32::MAX` not covered
|
= note: the matched value is of type `u32`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ 4294967294_u32..=u32::MAX => todo!() }
|
error[E0004]: non-exhaustive patterns: `0_u32` not covered
--> $DIR/half-open-range-pats-exhaustive-fail.rs:69:12
@ -203,7 +291,11 @@ LL | m!(0, ALMOST_MIN..);
| ^ pattern `0_u32` not covered
|
= note: the matched value is of type `u32`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ 0_u32 => todo!() }
|
error[E0004]: non-exhaustive patterns: `u32::MAX` not covered
--> $DIR/half-open-range-pats-exhaustive-fail.rs:70:12
@ -212,7 +304,11 @@ LL | m!(0, ..=ALMOST_MAX);
| ^ pattern `u32::MAX` not covered
|
= note: the matched value is of type `u32`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ u32::MAX => todo!() }
|
error[E0004]: non-exhaustive patterns: `43_u32` not covered
--> $DIR/half-open-range-pats-exhaustive-fail.rs:71:12
@ -221,7 +317,11 @@ LL | m!(0, ..=VAL | VAL_2..);
| ^ pattern `43_u32` not covered
|
= note: the matched value is of type `u32`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ 43_u32 => todo!() }
|
error[E0004]: non-exhaustive patterns: `43_u32` not covered
--> $DIR/half-open-range-pats-exhaustive-fail.rs:72:12
@ -230,7 +330,11 @@ LL | m!(0, ..VAL_1 | VAL_2..);
| ^ pattern `43_u32` not covered
|
= note: the matched value is of type `u32`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ 43_u32 => todo!() }
|
error[E0004]: non-exhaustive patterns: `u64::MAX` not covered
--> $DIR/half-open-range-pats-exhaustive-fail.rs:80:12
@ -239,7 +343,11 @@ LL | m!(0, ..u64::MAX);
| ^ pattern `u64::MAX` not covered
|
= note: the matched value is of type `u64`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ u64::MAX => todo!() }
|
error[E0004]: non-exhaustive patterns: `18446744073709551614_u64..=u64::MAX` not covered
--> $DIR/half-open-range-pats-exhaustive-fail.rs:81:12
@ -248,7 +356,11 @@ LL | m!(0, ..ALMOST_MAX);
| ^ pattern `18446744073709551614_u64..=u64::MAX` not covered
|
= note: the matched value is of type `u64`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ 18446744073709551614_u64..=u64::MAX => todo!() }
|
error[E0004]: non-exhaustive patterns: `0_u64` not covered
--> $DIR/half-open-range-pats-exhaustive-fail.rs:82:12
@ -257,7 +369,11 @@ LL | m!(0, ALMOST_MIN..);
| ^ pattern `0_u64` not covered
|
= note: the matched value is of type `u64`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ 0_u64 => todo!() }
|
error[E0004]: non-exhaustive patterns: `u64::MAX` not covered
--> $DIR/half-open-range-pats-exhaustive-fail.rs:83:12
@ -266,7 +382,11 @@ LL | m!(0, ..=ALMOST_MAX);
| ^ pattern `u64::MAX` not covered
|
= note: the matched value is of type `u64`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ u64::MAX => todo!() }
|
error[E0004]: non-exhaustive patterns: `43_u64` not covered
--> $DIR/half-open-range-pats-exhaustive-fail.rs:84:12
@ -275,7 +395,11 @@ LL | m!(0, ..=VAL | VAL_2..);
| ^ pattern `43_u64` not covered
|
= note: the matched value is of type `u64`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ 43_u64 => todo!() }
|
error[E0004]: non-exhaustive patterns: `43_u64` not covered
--> $DIR/half-open-range-pats-exhaustive-fail.rs:85:12
@ -284,7 +408,11 @@ LL | m!(0, ..VAL_1 | VAL_2..);
| ^ pattern `43_u64` not covered
|
= note: the matched value is of type `u64`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ 43_u64 => todo!() }
|
error[E0004]: non-exhaustive patterns: `u128::MAX` not covered
--> $DIR/half-open-range-pats-exhaustive-fail.rs:93:12
@ -293,7 +421,11 @@ LL | m!(0, ..u128::MAX);
| ^ pattern `u128::MAX` not covered
|
= note: the matched value is of type `u128`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ u128::MAX => todo!() }
|
error[E0004]: non-exhaustive patterns: `340282366920938463463374607431768211454_u128..=u128::MAX` not covered
--> $DIR/half-open-range-pats-exhaustive-fail.rs:94:12
@ -302,7 +434,11 @@ LL | m!(0, ..ALMOST_MAX);
| ^ pattern `340282366920938463463374607431768211454_u128..=u128::MAX` not covered
|
= note: the matched value is of type `u128`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ 340282366920938463463374607431768211454_u128..=u128::MAX => todo!() }
|
error[E0004]: non-exhaustive patterns: `0_u128` not covered
--> $DIR/half-open-range-pats-exhaustive-fail.rs:95:12
@ -311,7 +447,11 @@ LL | m!(0, ALMOST_MIN..);
| ^ pattern `0_u128` not covered
|
= note: the matched value is of type `u128`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ 0_u128 => todo!() }
|
error[E0004]: non-exhaustive patterns: `u128::MAX` not covered
--> $DIR/half-open-range-pats-exhaustive-fail.rs:96:12
@ -320,7 +460,11 @@ LL | m!(0, ..=ALMOST_MAX);
| ^ pattern `u128::MAX` not covered
|
= note: the matched value is of type `u128`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ u128::MAX => todo!() }
|
error[E0004]: non-exhaustive patterns: `43_u128` not covered
--> $DIR/half-open-range-pats-exhaustive-fail.rs:97:12
@ -329,7 +473,11 @@ LL | m!(0, ..=VAL | VAL_2..);
| ^ pattern `43_u128` not covered
|
= note: the matched value is of type `u128`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ 43_u128 => todo!() }
|
error[E0004]: non-exhaustive patterns: `43_u128` not covered
--> $DIR/half-open-range-pats-exhaustive-fail.rs:98:12
@ -338,7 +486,11 @@ LL | m!(0, ..VAL_1 | VAL_2..);
| ^ pattern `43_u128` not covered
|
= note: the matched value is of type `u128`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ 43_u128 => todo!() }
|
error[E0004]: non-exhaustive patterns: `i8::MAX` not covered
--> $DIR/half-open-range-pats-exhaustive-fail.rs:109:12
@ -347,7 +499,11 @@ LL | m!(0, ..i8::MAX);
| ^ pattern `i8::MAX` not covered
|
= note: the matched value is of type `i8`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ i8::MAX => todo!() }
|
error[E0004]: non-exhaustive patterns: `126_i8..=i8::MAX` not covered
--> $DIR/half-open-range-pats-exhaustive-fail.rs:110:12
@ -356,7 +512,11 @@ LL | m!(0, ..ALMOST_MAX);
| ^ pattern `126_i8..=i8::MAX` not covered
|
= note: the matched value is of type `i8`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ 126_i8..=i8::MAX => todo!() }
|
error[E0004]: non-exhaustive patterns: `i8::MIN` not covered
--> $DIR/half-open-range-pats-exhaustive-fail.rs:111:12
@ -365,7 +525,11 @@ LL | m!(0, ALMOST_MIN..);
| ^ pattern `i8::MIN` not covered
|
= note: the matched value is of type `i8`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ i8::MIN => todo!() }
|
error[E0004]: non-exhaustive patterns: `i8::MAX` not covered
--> $DIR/half-open-range-pats-exhaustive-fail.rs:112:12
@ -374,7 +538,11 @@ LL | m!(0, ..=ALMOST_MAX);
| ^ pattern `i8::MAX` not covered
|
= note: the matched value is of type `i8`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ i8::MAX => todo!() }
|
error[E0004]: non-exhaustive patterns: `43_i8` not covered
--> $DIR/half-open-range-pats-exhaustive-fail.rs:113:12
@ -383,7 +551,11 @@ LL | m!(0, ..=VAL | VAL_2..);
| ^ pattern `43_i8` not covered
|
= note: the matched value is of type `i8`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ 43_i8 => todo!() }
|
error[E0004]: non-exhaustive patterns: `43_i8` not covered
--> $DIR/half-open-range-pats-exhaustive-fail.rs:114:12
@ -392,7 +564,11 @@ LL | m!(0, ..VAL_1 | VAL_2..);
| ^ pattern `43_i8` not covered
|
= note: the matched value is of type `i8`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ 43_i8 => todo!() }
|
error[E0004]: non-exhaustive patterns: `i16::MAX` not covered
--> $DIR/half-open-range-pats-exhaustive-fail.rs:122:12
@ -401,7 +577,11 @@ LL | m!(0, ..i16::MAX);
| ^ pattern `i16::MAX` not covered
|
= note: the matched value is of type `i16`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ i16::MAX => todo!() }
|
error[E0004]: non-exhaustive patterns: `32766_i16..=i16::MAX` not covered
--> $DIR/half-open-range-pats-exhaustive-fail.rs:123:12
@ -410,7 +590,11 @@ LL | m!(0, ..ALMOST_MAX);
| ^ pattern `32766_i16..=i16::MAX` not covered
|
= note: the matched value is of type `i16`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ 32766_i16..=i16::MAX => todo!() }
|
error[E0004]: non-exhaustive patterns: `i16::MIN` not covered
--> $DIR/half-open-range-pats-exhaustive-fail.rs:124:12
@ -419,7 +603,11 @@ LL | m!(0, ALMOST_MIN..);
| ^ pattern `i16::MIN` not covered
|
= note: the matched value is of type `i16`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ i16::MIN => todo!() }
|
error[E0004]: non-exhaustive patterns: `i16::MAX` not covered
--> $DIR/half-open-range-pats-exhaustive-fail.rs:125:12
@ -428,7 +616,11 @@ LL | m!(0, ..=ALMOST_MAX);
| ^ pattern `i16::MAX` not covered
|
= note: the matched value is of type `i16`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ i16::MAX => todo!() }
|
error[E0004]: non-exhaustive patterns: `43_i16` not covered
--> $DIR/half-open-range-pats-exhaustive-fail.rs:126:12
@ -437,7 +629,11 @@ LL | m!(0, ..=VAL | VAL_2..);
| ^ pattern `43_i16` not covered
|
= note: the matched value is of type `i16`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ 43_i16 => todo!() }
|
error[E0004]: non-exhaustive patterns: `43_i16` not covered
--> $DIR/half-open-range-pats-exhaustive-fail.rs:127:12
@ -446,7 +642,11 @@ LL | m!(0, ..VAL_1 | VAL_2..);
| ^ pattern `43_i16` not covered
|
= note: the matched value is of type `i16`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ 43_i16 => todo!() }
|
error[E0004]: non-exhaustive patterns: `i32::MAX` not covered
--> $DIR/half-open-range-pats-exhaustive-fail.rs:135:12
@ -455,7 +655,11 @@ LL | m!(0, ..i32::MAX);
| ^ pattern `i32::MAX` not covered
|
= note: the matched value is of type `i32`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ i32::MAX => todo!() }
|
error[E0004]: non-exhaustive patterns: `2147483646_i32..=i32::MAX` not covered
--> $DIR/half-open-range-pats-exhaustive-fail.rs:136:12
@ -464,7 +668,11 @@ LL | m!(0, ..ALMOST_MAX);
| ^ pattern `2147483646_i32..=i32::MAX` not covered
|
= note: the matched value is of type `i32`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ 2147483646_i32..=i32::MAX => todo!() }
|
error[E0004]: non-exhaustive patterns: `i32::MIN` not covered
--> $DIR/half-open-range-pats-exhaustive-fail.rs:137:12
@ -473,7 +681,11 @@ LL | m!(0, ALMOST_MIN..);
| ^ pattern `i32::MIN` not covered
|
= note: the matched value is of type `i32`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ i32::MIN => todo!() }
|
error[E0004]: non-exhaustive patterns: `i32::MAX` not covered
--> $DIR/half-open-range-pats-exhaustive-fail.rs:138:12
@ -482,7 +694,11 @@ LL | m!(0, ..=ALMOST_MAX);
| ^ pattern `i32::MAX` not covered
|
= note: the matched value is of type `i32`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ i32::MAX => todo!() }
|
error[E0004]: non-exhaustive patterns: `43_i32` not covered
--> $DIR/half-open-range-pats-exhaustive-fail.rs:139:12
@ -491,7 +707,11 @@ LL | m!(0, ..=VAL | VAL_2..);
| ^ pattern `43_i32` not covered
|
= note: the matched value is of type `i32`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ 43_i32 => todo!() }
|
error[E0004]: non-exhaustive patterns: `43_i32` not covered
--> $DIR/half-open-range-pats-exhaustive-fail.rs:140:12
@ -500,7 +720,11 @@ LL | m!(0, ..VAL_1 | VAL_2..);
| ^ pattern `43_i32` not covered
|
= note: the matched value is of type `i32`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ 43_i32 => todo!() }
|
error[E0004]: non-exhaustive patterns: `i64::MAX` not covered
--> $DIR/half-open-range-pats-exhaustive-fail.rs:148:12
@ -509,7 +733,11 @@ LL | m!(0, ..i64::MAX);
| ^ pattern `i64::MAX` not covered
|
= note: the matched value is of type `i64`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ i64::MAX => todo!() }
|
error[E0004]: non-exhaustive patterns: `9223372036854775806_i64..=i64::MAX` not covered
--> $DIR/half-open-range-pats-exhaustive-fail.rs:149:12
@ -518,7 +746,11 @@ LL | m!(0, ..ALMOST_MAX);
| ^ pattern `9223372036854775806_i64..=i64::MAX` not covered
|
= note: the matched value is of type `i64`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ 9223372036854775806_i64..=i64::MAX => todo!() }
|
error[E0004]: non-exhaustive patterns: `i64::MIN` not covered
--> $DIR/half-open-range-pats-exhaustive-fail.rs:150:12
@ -527,7 +759,11 @@ LL | m!(0, ALMOST_MIN..);
| ^ pattern `i64::MIN` not covered
|
= note: the matched value is of type `i64`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ i64::MIN => todo!() }
|
error[E0004]: non-exhaustive patterns: `i64::MAX` not covered
--> $DIR/half-open-range-pats-exhaustive-fail.rs:151:12
@ -536,7 +772,11 @@ LL | m!(0, ..=ALMOST_MAX);
| ^ pattern `i64::MAX` not covered
|
= note: the matched value is of type `i64`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ i64::MAX => todo!() }
|
error[E0004]: non-exhaustive patterns: `43_i64` not covered
--> $DIR/half-open-range-pats-exhaustive-fail.rs:152:12
@ -545,7 +785,11 @@ LL | m!(0, ..=VAL | VAL_2..);
| ^ pattern `43_i64` not covered
|
= note: the matched value is of type `i64`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ 43_i64 => todo!() }
|
error[E0004]: non-exhaustive patterns: `43_i64` not covered
--> $DIR/half-open-range-pats-exhaustive-fail.rs:153:12
@ -554,7 +798,11 @@ LL | m!(0, ..VAL_1 | VAL_2..);
| ^ pattern `43_i64` not covered
|
= note: the matched value is of type `i64`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ 43_i64 => todo!() }
|
error[E0004]: non-exhaustive patterns: `i128::MAX` not covered
--> $DIR/half-open-range-pats-exhaustive-fail.rs:161:12
@ -563,7 +811,11 @@ LL | m!(0, ..i128::MAX);
| ^ pattern `i128::MAX` not covered
|
= note: the matched value is of type `i128`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ i128::MAX => todo!() }
|
error[E0004]: non-exhaustive patterns: `170141183460469231731687303715884105726_i128..=i128::MAX` not covered
--> $DIR/half-open-range-pats-exhaustive-fail.rs:162:12
@ -572,7 +824,11 @@ LL | m!(0, ..ALMOST_MAX);
| ^ pattern `170141183460469231731687303715884105726_i128..=i128::MAX` not covered
|
= note: the matched value is of type `i128`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ 170141183460469231731687303715884105726_i128..=i128::MAX => todo!() }
|
error[E0004]: non-exhaustive patterns: `i128::MIN` not covered
--> $DIR/half-open-range-pats-exhaustive-fail.rs:163:12
@ -581,7 +837,11 @@ LL | m!(0, ALMOST_MIN..);
| ^ pattern `i128::MIN` not covered
|
= note: the matched value is of type `i128`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ i128::MIN => todo!() }
|
error[E0004]: non-exhaustive patterns: `i128::MAX` not covered
--> $DIR/half-open-range-pats-exhaustive-fail.rs:164:12
@ -590,7 +850,11 @@ LL | m!(0, ..=ALMOST_MAX);
| ^ pattern `i128::MAX` not covered
|
= note: the matched value is of type `i128`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ i128::MAX => todo!() }
|
error[E0004]: non-exhaustive patterns: `43_i128` not covered
--> $DIR/half-open-range-pats-exhaustive-fail.rs:165:12
@ -599,7 +863,11 @@ LL | m!(0, ..=VAL | VAL_2..);
| ^ pattern `43_i128` not covered
|
= note: the matched value is of type `i128`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ 43_i128 => todo!() }
|
error[E0004]: non-exhaustive patterns: `43_i128` not covered
--> $DIR/half-open-range-pats-exhaustive-fail.rs:166:12
@ -608,7 +876,11 @@ LL | m!(0, ..VAL_1 | VAL_2..);
| ^ pattern `43_i128` not covered
|
= note: the matched value is of type `i128`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ 43_i128 => todo!() }
|
error: aborting due to 68 previous errors

View file

@ -11,7 +11,10 @@ LL | match l { L::A => () };
| ^ pattern `B` not covered
|
= note: the matched value is of type `L`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL | match l { L::A => (), B => todo!() };
| ++++++++++++++
error[E0004]: non-exhaustive patterns: type `E1` is non-empty
--> $DIR/match_non_exhaustive.rs:28:11

View file

@ -5,7 +5,11 @@ LL | match (0u8, 0u8) {
| ^^^^^^^^^^ pattern `(2_u8..=u8::MAX, _)` not covered
|
= note: the matched value is of type `(u8, u8)`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ (0 | 1, 2 | 3) => {}
LL + (2_u8..=u8::MAX, _) => todo!()
|
error[E0004]: non-exhaustive patterns: `((4_u8..=u8::MAX))` not covered
--> $DIR/exhaustiveness-non-exhaustive.rs:9:11
@ -14,7 +18,11 @@ LL | match ((0u8,),) {
| ^^^^^^^^^ pattern `((4_u8..=u8::MAX))` not covered
|
= note: the matched value is of type `((u8,),)`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ ((0 | 1,) | (2 | 3,),) => {}
LL + ((4_u8..=u8::MAX)) => todo!()
|
error[E0004]: non-exhaustive patterns: `(Some(2_u8..=u8::MAX))` not covered
--> $DIR/exhaustiveness-non-exhaustive.rs:13:11
@ -23,7 +31,11 @@ LL | match (Some(0u8),) {
| ^^^^^^^^^^^^ pattern `(Some(2_u8..=u8::MAX))` not covered
|
= note: the matched value is of type `(Option<u8>,)`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ (None | Some(0 | 1),) => {}
LL + (Some(2_u8..=u8::MAX)) => todo!()
|
error: aborting due to 3 previous errors

View file

@ -19,7 +19,11 @@ LL | match 0 {
| ^ patterns `i32::MIN..=-1_i32` and `3_i32..=i32::MAX` not covered
|
= note: the matched value is of type `i32`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ 0 | (1 | 2) => {}
LL + i32::MIN..=-1_i32 | 3_i32..=i32::MAX => todo!()
|
error: aborting due to 2 previous errors

View file

@ -33,7 +33,11 @@ LL | B,
| - not covered
|
= note: the matched value is of type `Foo`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ Foo::A => {}
LL + B | _ => todo!()
|
error[E0004]: non-exhaustive patterns: `Some(B)` and `Some(_)` not covered
--> $DIR/doc-hidden-non-exhaustive.rs:25:11

View file

@ -155,7 +155,11 @@ LL | match_guarded_arm!(0u8);
| ^^^ pattern `_` not covered
|
= note: the matched value is of type `u8`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ _ if false => {}
LL + _ => todo!()
|
error[E0004]: non-exhaustive patterns: `NonEmptyStruct1` not covered
--> $DIR/empty-match.rs:88:24
@ -167,7 +171,11 @@ LL | match_guarded_arm!(NonEmptyStruct1);
| ^^^^^^^^^^^^^^^ pattern `NonEmptyStruct1` not covered
|
= note: the matched value is of type `NonEmptyStruct1`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ _ if false => {}
LL + NonEmptyStruct1 => todo!()
|
error[E0004]: non-exhaustive patterns: `NonEmptyStruct2(_)` not covered
--> $DIR/empty-match.rs:89:24
@ -179,7 +187,11 @@ LL | match_guarded_arm!(NonEmptyStruct2(true));
| ^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyStruct2(_)` not covered
|
= note: the matched value is of type `NonEmptyStruct2`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ _ if false => {}
LL + NonEmptyStruct2(_) => todo!()
|
error[E0004]: non-exhaustive patterns: `NonEmptyUnion1 { .. }` not covered
--> $DIR/empty-match.rs:90:24
@ -193,7 +205,11 @@ LL | match_guarded_arm!((NonEmptyUnion1 { foo: () }));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyUnion1 { .. }` not covered
|
= note: the matched value is of type `NonEmptyUnion1`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ _ if false => {}
LL + NonEmptyUnion1 { .. } => todo!()
|
error[E0004]: non-exhaustive patterns: `NonEmptyUnion2 { .. }` not covered
--> $DIR/empty-match.rs:91:24
@ -208,7 +224,11 @@ LL | match_guarded_arm!((NonEmptyUnion2 { foo: () }));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyUnion2 { .. }` not covered
|
= note: the matched value is of type `NonEmptyUnion2`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ _ if false => {}
LL + NonEmptyUnion2 { .. } => todo!()
|
error[E0004]: non-exhaustive patterns: `Foo(_)` not covered
--> $DIR/empty-match.rs:92:24
@ -223,7 +243,11 @@ LL | match_guarded_arm!(NonEmptyEnum1::Foo(true));
| ^^^^^^^^^^^^^^^^^^^^^^^^ pattern `Foo(_)` not covered
|
= note: the matched value is of type `NonEmptyEnum1`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ _ if false => {}
LL + Foo(_) => todo!()
|
error[E0004]: non-exhaustive patterns: `Foo(_)` and `Bar` not covered
--> $DIR/empty-match.rs:93:24
@ -240,7 +264,11 @@ LL | match_guarded_arm!(NonEmptyEnum2::Foo(true));
| ^^^^^^^^^^^^^^^^^^^^^^^^ patterns `Foo(_)` and `Bar` not covered
|
= note: the matched value is of type `NonEmptyEnum2`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ _ if false => {}
LL + Foo(_) | Bar => todo!()
|
error[E0004]: non-exhaustive patterns: `V1`, `V2`, `V3` and 2 more not covered
--> $DIR/empty-match.rs:94:24
@ -254,7 +282,11 @@ LL | match_guarded_arm!(NonEmptyEnum5::V1);
| ^^^^^^^^^^^^^^^^^ patterns `V1`, `V2`, `V3` and 2 more not covered
|
= note: the matched value is of type `NonEmptyEnum5`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ _ if false => {}
LL + _ => todo!()
|
error: aborting due to 22 previous errors

View file

@ -155,7 +155,11 @@ LL | match_guarded_arm!(0u8);
| ^^^ pattern `_` not covered
|
= note: the matched value is of type `u8`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ _ if false => {}
LL + _ => todo!()
|
error[E0004]: non-exhaustive patterns: `NonEmptyStruct1` not covered
--> $DIR/empty-match.rs:88:24
@ -167,7 +171,11 @@ LL | match_guarded_arm!(NonEmptyStruct1);
| ^^^^^^^^^^^^^^^ pattern `NonEmptyStruct1` not covered
|
= note: the matched value is of type `NonEmptyStruct1`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ _ if false => {}
LL + NonEmptyStruct1 => todo!()
|
error[E0004]: non-exhaustive patterns: `NonEmptyStruct2(_)` not covered
--> $DIR/empty-match.rs:89:24
@ -179,7 +187,11 @@ LL | match_guarded_arm!(NonEmptyStruct2(true));
| ^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyStruct2(_)` not covered
|
= note: the matched value is of type `NonEmptyStruct2`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ _ if false => {}
LL + NonEmptyStruct2(_) => todo!()
|
error[E0004]: non-exhaustive patterns: `NonEmptyUnion1 { .. }` not covered
--> $DIR/empty-match.rs:90:24
@ -193,7 +205,11 @@ LL | match_guarded_arm!((NonEmptyUnion1 { foo: () }));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyUnion1 { .. }` not covered
|
= note: the matched value is of type `NonEmptyUnion1`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ _ if false => {}
LL + NonEmptyUnion1 { .. } => todo!()
|
error[E0004]: non-exhaustive patterns: `NonEmptyUnion2 { .. }` not covered
--> $DIR/empty-match.rs:91:24
@ -208,7 +224,11 @@ LL | match_guarded_arm!((NonEmptyUnion2 { foo: () }));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyUnion2 { .. }` not covered
|
= note: the matched value is of type `NonEmptyUnion2`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ _ if false => {}
LL + NonEmptyUnion2 { .. } => todo!()
|
error[E0004]: non-exhaustive patterns: `Foo(_)` not covered
--> $DIR/empty-match.rs:92:24
@ -223,7 +243,11 @@ LL | match_guarded_arm!(NonEmptyEnum1::Foo(true));
| ^^^^^^^^^^^^^^^^^^^^^^^^ pattern `Foo(_)` not covered
|
= note: the matched value is of type `NonEmptyEnum1`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ _ if false => {}
LL + Foo(_) => todo!()
|
error[E0004]: non-exhaustive patterns: `Foo(_)` and `Bar` not covered
--> $DIR/empty-match.rs:93:24
@ -240,7 +264,11 @@ LL | match_guarded_arm!(NonEmptyEnum2::Foo(true));
| ^^^^^^^^^^^^^^^^^^^^^^^^ patterns `Foo(_)` and `Bar` not covered
|
= note: the matched value is of type `NonEmptyEnum2`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ _ if false => {}
LL + Foo(_) | Bar => todo!()
|
error[E0004]: non-exhaustive patterns: `V1`, `V2`, `V3` and 2 more not covered
--> $DIR/empty-match.rs:94:24
@ -254,7 +282,11 @@ LL | match_guarded_arm!(NonEmptyEnum5::V1);
| ^^^^^^^^^^^^^^^^^ patterns `V1`, `V2`, `V3` and 2 more not covered
|
= note: the matched value is of type `NonEmptyEnum5`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ _ if false => {}
LL + _ => todo!()
|
error: aborting due to 22 previous errors

View file

@ -5,7 +5,11 @@ LL | match 0.0 {
| ^^^ pattern `_` not covered
|
= note: the matched value is of type `f64`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ 0.0..=1.0 => {}
LL + _ => todo!()
|
error: unreachable pattern
--> $DIR/floats.rs:16:7

View file

@ -5,7 +5,11 @@ LL | m!(0u8, 0..255);
| ^^^ pattern `u8::MAX` not covered
|
= note: the matched value is of type `u8`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ u8::MAX => todo!() }
|
error[E0004]: non-exhaustive patterns: `u8::MAX` not covered
--> $DIR/exhaustiveness.rs:48:8
@ -14,7 +18,11 @@ LL | m!(0u8, 0..=254);
| ^^^ pattern `u8::MAX` not covered
|
= note: the matched value is of type `u8`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ u8::MAX => todo!() }
|
error[E0004]: non-exhaustive patterns: `0_u8` not covered
--> $DIR/exhaustiveness.rs:49:8
@ -23,7 +31,11 @@ LL | m!(0u8, 1..=255);
| ^^^ pattern `0_u8` not covered
|
= note: the matched value is of type `u8`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ 0_u8 => todo!() }
|
error[E0004]: non-exhaustive patterns: `42_u8` not covered
--> $DIR/exhaustiveness.rs:50:8
@ -32,7 +44,11 @@ LL | m!(0u8, 0..42 | 43..=255);
| ^^^ pattern `42_u8` not covered
|
= note: the matched value is of type `u8`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ 42_u8 => todo!() }
|
error[E0004]: non-exhaustive patterns: `i8::MAX` not covered
--> $DIR/exhaustiveness.rs:51:8
@ -41,7 +57,11 @@ LL | m!(0i8, -128..127);
| ^^^ pattern `i8::MAX` not covered
|
= note: the matched value is of type `i8`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ i8::MAX => todo!() }
|
error[E0004]: non-exhaustive patterns: `i8::MAX` not covered
--> $DIR/exhaustiveness.rs:52:8
@ -50,7 +70,11 @@ LL | m!(0i8, -128..=126);
| ^^^ pattern `i8::MAX` not covered
|
= note: the matched value is of type `i8`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ i8::MAX => todo!() }
|
error[E0004]: non-exhaustive patterns: `i8::MIN` not covered
--> $DIR/exhaustiveness.rs:53:8
@ -59,7 +83,11 @@ LL | m!(0i8, -127..=127);
| ^^^ pattern `i8::MIN` not covered
|
= note: the matched value is of type `i8`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ i8::MIN => todo!() }
|
error[E0004]: non-exhaustive patterns: `0_i8` not covered
--> $DIR/exhaustiveness.rs:54:11
@ -77,7 +105,11 @@ LL | m!(0u128, 0..=ALMOST_MAX);
| ^^^^^ pattern `u128::MAX` not covered
|
= note: the matched value is of type `u128`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ u128::MAX => todo!() }
|
error[E0004]: non-exhaustive patterns: `5_u128..=u128::MAX` not covered
--> $DIR/exhaustiveness.rs:60:8
@ -86,7 +118,11 @@ LL | m!(0u128, 0..=4);
| ^^^^^ pattern `5_u128..=u128::MAX` not covered
|
= note: the matched value is of type `u128`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ 5_u128..=u128::MAX => todo!() }
|
error[E0004]: non-exhaustive patterns: `0_u128` not covered
--> $DIR/exhaustiveness.rs:61:8
@ -95,7 +131,11 @@ LL | m!(0u128, 1..=u128::MAX);
| ^^^^^ pattern `0_u128` not covered
|
= note: the matched value is of type `u128`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ 0_u128 => todo!() }
|
error[E0004]: non-exhaustive patterns: `(126_u8..=127_u8, false)` not covered
--> $DIR/exhaustiveness.rs:69:11

View file

@ -7,7 +7,11 @@ LL | match 0usize {
= note: the matched value is of type `usize`
= note: `usize` does not have a fixed maximum value, so a wildcard `_` is necessary to match exhaustively
= help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `usize` matching
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ 0 ..= usize::MAX => {}
LL + _ => todo!()
|
error[E0004]: non-exhaustive patterns: `_` not covered
--> $DIR/pointer-sized-int.rs:17:11
@ -18,7 +22,11 @@ LL | match 0isize {
= note: the matched value is of type `isize`
= note: `isize` does not have a fixed maximum value, so a wildcard `_` is necessary to match exhaustively
= help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `isize` matching
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ isize::MIN ..= isize::MAX => {}
LL + _ => todo!()
|
error[E0004]: non-exhaustive patterns: `_` not covered
--> $DIR/pointer-sized-int.rs:22:8
@ -29,7 +37,11 @@ LL | m!(0usize, 0..=usize::MAX);
= note: the matched value is of type `usize`
= note: `usize` does not have a fixed maximum value, so a wildcard `_` is necessary to match exhaustively
= help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `usize` matching
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ _ => todo!() }
|
error[E0004]: non-exhaustive patterns: `_` not covered
--> $DIR/pointer-sized-int.rs:24:8
@ -40,7 +52,11 @@ LL | m!(0usize, 0..5 | 5..=usize::MAX);
= note: the matched value is of type `usize`
= note: `usize` does not have a fixed maximum value, so a wildcard `_` is necessary to match exhaustively
= help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `usize` matching
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ _ => todo!() }
|
error[E0004]: non-exhaustive patterns: `_` not covered
--> $DIR/pointer-sized-int.rs:26:8
@ -51,7 +67,11 @@ LL | m!(0usize, 0..usize::MAX | usize::MAX);
= note: the matched value is of type `usize`
= note: `usize` does not have a fixed maximum value, so a wildcard `_` is necessary to match exhaustively
= help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `usize` matching
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ _ => todo!() }
|
error[E0004]: non-exhaustive patterns: `(_, _)` not covered
--> $DIR/pointer-sized-int.rs:28:8
@ -60,7 +80,11 @@ LL | m!((0usize, true), (0..5, true) | (5..=usize::MAX, true) | (0..=usize::
| ^^^^^^^^^^^^^^ pattern `(_, _)` not covered
|
= note: the matched value is of type `(usize, bool)`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ (_, _) => todo!() }
|
error[E0004]: non-exhaustive patterns: `_` not covered
--> $DIR/pointer-sized-int.rs:31:8
@ -71,7 +95,11 @@ LL | m!(0isize, isize::MIN..=isize::MAX);
= note: the matched value is of type `isize`
= note: `isize` does not have a fixed maximum value, so a wildcard `_` is necessary to match exhaustively
= help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `isize` matching
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ _ => todo!() }
|
error[E0004]: non-exhaustive patterns: `_` not covered
--> $DIR/pointer-sized-int.rs:33:8
@ -82,7 +110,11 @@ LL | m!(0isize, isize::MIN..5 | 5..=isize::MAX);
= note: the matched value is of type `isize`
= note: `isize` does not have a fixed maximum value, so a wildcard `_` is necessary to match exhaustively
= help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `isize` matching
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ _ => todo!() }
|
error[E0004]: non-exhaustive patterns: `_` not covered
--> $DIR/pointer-sized-int.rs:35:8
@ -93,7 +125,11 @@ LL | m!(0isize, isize::MIN..isize::MAX | isize::MAX);
= note: the matched value is of type `isize`
= note: `isize` does not have a fixed maximum value, so a wildcard `_` is necessary to match exhaustively
= help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `isize` matching
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ _ => todo!() }
|
error[E0004]: non-exhaustive patterns: `(_, _)` not covered
--> $DIR/pointer-sized-int.rs:37:8
@ -102,7 +138,11 @@ LL | m!((0isize, true), (isize::MIN..5, true)
| ^^^^^^^^^^^^^^ pattern `(_, _)` not covered
|
= note: the matched value is of type `(isize, bool)`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ match $s { $($t)+ => {}
LL ~ (_, _) => todo!() }
|
error[E0004]: non-exhaustive patterns: `_` not covered
--> $DIR/pointer-sized-int.rs:41:11

View file

@ -7,7 +7,11 @@ LL | match 0usize {
= note: the matched value is of type `usize`
= note: `usize` does not have a fixed maximum value, so a wildcard `_` is necessary to match exhaustively
= help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `usize` matching
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ 0..=usize::MAX => {}
LL + _ => todo!()
|
error[E0004]: non-exhaustive patterns: `_` not covered
--> $DIR/precise_pointer_matching-message.rs:11:11
@ -18,7 +22,11 @@ LL | match 0isize {
= note: the matched value is of type `isize`
= note: `isize` does not have a fixed maximum value, so a wildcard `_` is necessary to match exhaustively
= help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `isize` matching
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ isize::MIN..=isize::MAX => {}
LL + _ => todo!()
|
error: aborting due to 2 previous errors

View file

@ -5,7 +5,11 @@ LL | match "world" {
| ^^^^^^^ pattern `&_` not covered
|
= note: the matched value is of type `&str`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ "hello" => {}
LL + &_ => todo!()
|
error[E0004]: non-exhaustive patterns: `&_` not covered
--> $DIR/issue-30240.rs:6:11

View file

@ -5,7 +5,11 @@ LL | match (A, ()) {
| ^^^^^^^ patterns `(B, _)`, `(C, _)`, `(D, _)` and 2 more not covered
|
= note: the matched value is of type `(Enum, ())`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ (A, _) => {}
LL + _ => todo!()
|
error[E0004]: non-exhaustive patterns: `(_, B)`, `(_, C)`, `(_, D)` and 2 more not covered
--> $DIR/issue-35609.rs:14:11
@ -14,7 +18,11 @@ LL | match (A, A) {
| ^^^^^^ patterns `(_, B)`, `(_, C)`, `(_, D)` and 2 more not covered
|
= note: the matched value is of type `(Enum, Enum)`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ (_, A) => {}
LL + _ => todo!()
|
error[E0004]: non-exhaustive patterns: `((B, _), _)`, `((C, _), _)`, `((D, _), _)` and 2 more not covered
--> $DIR/issue-35609.rs:18:11
@ -23,7 +31,11 @@ LL | match ((A, ()), ()) {
| ^^^^^^^^^^^^^ patterns `((B, _), _)`, `((C, _), _)`, `((D, _), _)` and 2 more not covered
|
= note: the matched value is of type `((Enum, ()), ())`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ ((A, ()), _) => {}
LL + _ => todo!()
|
error[E0004]: non-exhaustive patterns: `((B, _), _)`, `((C, _), _)`, `((D, _), _)` and 2 more not covered
--> $DIR/issue-35609.rs:22:11
@ -32,7 +44,11 @@ LL | match ((A, ()), A) {
| ^^^^^^^^^^^^ patterns `((B, _), _)`, `((C, _), _)`, `((D, _), _)` and 2 more not covered
|
= note: the matched value is of type `((Enum, ()), Enum)`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ ((A, ()), _) => {}
LL + _ => todo!()
|
error[E0004]: non-exhaustive patterns: `((B, _), _)`, `((C, _), _)`, `((D, _), _)` and 2 more not covered
--> $DIR/issue-35609.rs:26:11
@ -41,7 +57,11 @@ LL | match ((A, ()), ()) {
| ^^^^^^^^^^^^^ patterns `((B, _), _)`, `((C, _), _)`, `((D, _), _)` and 2 more not covered
|
= note: the matched value is of type `((Enum, ()), ())`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ ((A, _), _) => {}
LL + _ => todo!()
|
error[E0004]: non-exhaustive patterns: `S(B, _)`, `S(C, _)`, `S(D, _)` and 2 more not covered
--> $DIR/issue-35609.rs:31:11
@ -53,7 +73,11 @@ LL | match S(A, ()) {
| ^^^^^^^^ patterns `S(B, _)`, `S(C, _)`, `S(D, _)` and 2 more not covered
|
= note: the matched value is of type `S`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ S(A, _) => {}
LL + _ => todo!()
|
error[E0004]: non-exhaustive patterns: `Sd { x: B, .. }`, `Sd { x: C, .. }`, `Sd { x: D, .. }` and 2 more not covered
--> $DIR/issue-35609.rs:35:11
@ -65,7 +89,11 @@ LL | match (Sd { x: A, y: () }) {
| ^^^^^^^^^^^^^^^^^^^^ patterns `Sd { x: B, .. }`, `Sd { x: C, .. }`, `Sd { x: D, .. }` and 2 more not covered
|
= note: the matched value is of type `Sd`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ Sd { x: A, y: _ } => {}
LL + _ => todo!()
|
error[E0004]: non-exhaustive patterns: `Some(B)`, `Some(C)`, `Some(D)` and 2 more not covered
--> $DIR/issue-35609.rs:39:11

View file

@ -5,7 +5,11 @@ LL | box NodeKind::Element(ed) => match ed.kind {
| ^^^^^^^ pattern `box _` not covered
|
= note: the matched value is of type `Box<ElementKind>`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ box ElementKind::HTMLImageElement(ref d) if d.image.is_some() => { true }
LL + box _ => todo!()
|
error: aborting due to previous error

View file

@ -11,7 +11,11 @@ LL | match proto {
| ^^^^^ pattern `C(QA)` not covered
|
= note: the matched value is of type `P`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ P::C(PC::Q) => (),
LL ~ C(QA) => todo!(),
|
error: aborting due to previous error

View file

@ -8,7 +8,11 @@ LL | match Tag::ExifIFDPointer {
| ^^^^^^^^^^^^^^^^^^^ pattern `Tag(Exif, _)` not covered
|
= note: the matched value is of type `Tag`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ Tag::ExifIFDPointer => {}
LL + Tag(Exif, _) => todo!()
|
error: aborting due to previous error

View file

@ -5,7 +5,11 @@ LL | match buf {
| ^^^ patterns `&[0_u8..=64_u8, _, _, _]` and `&[66_u8..=u8::MAX, _, _, _]` not covered
|
= note: the matched value is of type `&[u8; 4]`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ b"AAAA" => {}
LL + &[0_u8..=64_u8, _, _, _] | &[66_u8..=u8::MAX, _, _, _] => todo!()
|
error[E0004]: non-exhaustive patterns: `&[]`, `&[_]`, `&[_, _]` and 2 more not covered
--> $DIR/match-byte-array-patterns-2.rs:10:11
@ -14,7 +18,11 @@ LL | match buf {
| ^^^ patterns `&[]`, `&[_]`, `&[_, _]` and 2 more not covered
|
= note: the matched value is of type `&[u8]`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ b"AAAA" => {}
LL + _ => todo!()
|
error: aborting due to 2 previous errors

View file

@ -5,7 +5,10 @@ LL | match 0 { 1 => () }
| ^ patterns `i32::MIN..=0_i32` and `2_i32..=i32::MAX` not covered
|
= note: the matched value is of type `i32`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL | match 0 { 1 => (), i32::MIN..=0_i32 | 2_i32..=i32::MAX => todo!() }
| ++++++++++++++++++++++++++++++++++++++++++++++++
error[E0004]: non-exhaustive patterns: `_` not covered
--> $DIR/match-non-exhaustive.rs:3:11
@ -14,7 +17,10 @@ LL | match 0 { 0 if false => () }
| ^ pattern `_` not covered
|
= note: the matched value is of type `i32`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL | match 0 { 0 if false => (), _ => todo!() }
| ++++++++++++++
error: aborting due to 2 previous errors

View file

@ -20,7 +20,11 @@ LL | match e1 {
| ^^ patterns `B` and `C` not covered
|
= note: the matched value is of type `E`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ E::A => {}
LL + B | C => todo!()
|
error[E0005]: refutable pattern in local binding: `B` and `C` not covered
--> $DIR/non-exhaustive-defined-here.rs:36:9
@ -73,7 +77,11 @@ LL | match e {
| ^ patterns `&B` and `&C` not covered
|
= note: the matched value is of type `&E`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ E::A => {}
LL + &B | &C => todo!()
|
error[E0005]: refutable pattern in local binding: `&B` and `&C` not covered
--> $DIR/non-exhaustive-defined-here.rs:44:9
@ -126,7 +134,11 @@ LL | match e {
| ^ patterns `&&mut &B` and `&&mut &C` not covered
|
= note: the matched value is of type `&&mut &E`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ E::A => {}
LL + &&mut &B | &&mut &C => todo!()
|
error[E0005]: refutable pattern in local binding: `&&mut &B` and `&&mut &C` not covered
--> $DIR/non-exhaustive-defined-here.rs:52:9
@ -174,7 +186,11 @@ LL | match e {
| ^ pattern `None` not covered
|
= note: the matched value is of type `Opt`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ Opt::Some(ref _x) => {}
LL + None => todo!()
|
error[E0005]: refutable pattern in local binding: `None` not covered
--> $DIR/non-exhaustive-defined-here.rs:69:9

View file

@ -11,7 +11,10 @@ LL | match x { T::B => { } }
| ^ pattern `A` not covered
|
= note: the matched value is of type `T`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL | match x { T::B => { } A => todo!() }
| ++++++++++++
error[E0004]: non-exhaustive patterns: `false` not covered
--> $DIR/non-exhaustive-match.rs:8:11
@ -20,7 +23,11 @@ LL | match true {
| ^^^^ pattern `false` not covered
|
= note: the matched value is of type `bool`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ true => {}
LL + false => todo!()
|
error[E0004]: non-exhaustive patterns: `Some(_)` not covered
--> $DIR/non-exhaustive-match.rs:11:11
@ -34,7 +41,11 @@ LL | Some(#[stable(feature = "rust1", since = "1.0.0")] T),
| ---- not covered
|
= note: the matched value is of type `Option<i32>`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ None => {}
LL + Some(_) => todo!()
|
error[E0004]: non-exhaustive patterns: `(_, _, i32::MIN..=3_i32)` and `(_, _, 5_i32..=i32::MAX)` not covered
--> $DIR/non-exhaustive-match.rs:14:11
@ -43,7 +54,11 @@ LL | match (2, 3, 4) {
| ^^^^^^^^^ patterns `(_, _, i32::MIN..=3_i32)` and `(_, _, 5_i32..=i32::MAX)` not covered
|
= note: the matched value is of type `(i32, i32, i32)`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ (_, _, 4) => {}
LL + (_, _, i32::MIN..=3_i32) | (_, _, 5_i32..=i32::MAX) => todo!()
|
error[E0004]: non-exhaustive patterns: `(A, A)` and `(B, B)` not covered
--> $DIR/non-exhaustive-match.rs:18:11
@ -67,7 +82,11 @@ LL | match T::A {
| ^^^^ pattern `B` not covered
|
= note: the matched value is of type `T`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ T::A => {}
LL + B => todo!()
|
error[E0004]: non-exhaustive patterns: `[]` not covered
--> $DIR/non-exhaustive-match.rs:33:11

View file

@ -46,7 +46,11 @@ LL | match Direction::North {
| ^^^^^^^^^^^^^^^^ patterns `East`, `South` and `West` not covered
|
= note: the matched value is of type `Direction`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ Direction::North => (),
LL + East | South | West => todo!()
|
error[E0004]: non-exhaustive patterns: `Second`, `Third`, `Fourth` and 8 more not covered
--> $DIR/non-exhaustive-pattern-witness.rs:46:11
@ -60,7 +64,11 @@ LL | match ExcessiveEnum::First {
| ^^^^^^^^^^^^^^^^^^^^ patterns `Second`, `Third`, `Fourth` and 8 more not covered
|
= note: the matched value is of type `ExcessiveEnum`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ ExcessiveEnum::First => (),
LL + _ => todo!()
|
error[E0004]: non-exhaustive patterns: `CustomRGBA { a: true, .. }` not covered
--> $DIR/non-exhaustive-pattern-witness.rs:54:11
@ -95,7 +103,11 @@ LL | match ((), false) {
| ^^^^^^^^^^^ pattern `((), false)` not covered
|
= note: the matched value is of type `((), bool)`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ ((), true) => (),
LL + ((), false) => todo!()
|
error: aborting due to 7 previous errors

View file

@ -5,7 +5,11 @@ LL | match s2 {
| ^^ pattern `&[false, _]` not covered
|
= note: the matched value is of type `&[bool; 2]`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ [true, .., true] => {}
LL + &[false, _] => todo!()
|
error[E0004]: non-exhaustive patterns: `&[false, ..]` not covered
--> $DIR/slice-patterns-exhaustiveness.rs:12:11
@ -14,7 +18,11 @@ LL | match s3 {
| ^^ pattern `&[false, ..]` not covered
|
= note: the matched value is of type `&[bool; 3]`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ [true, .., true] => {}
LL + &[false, ..] => todo!()
|
error[E0004]: non-exhaustive patterns: `&[false, ..]` not covered
--> $DIR/slice-patterns-exhaustiveness.rs:16:11
@ -23,7 +31,11 @@ LL | match s10 {
| ^^^ pattern `&[false, ..]` not covered
|
= note: the matched value is of type `&[bool; 10]`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ [true, .., true] => {}
LL + &[false, ..] => todo!()
|
error[E0004]: non-exhaustive patterns: `&[false, true]` not covered
--> $DIR/slice-patterns-exhaustiveness.rs:25:11
@ -59,7 +71,11 @@ LL | match s {
| ^ pattern `&[_, ..]` not covered
|
= note: the matched value is of type `&[bool]`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ [] => {}
LL + &[_, ..] => todo!()
|
error[E0004]: non-exhaustive patterns: `&[_, _, ..]` not covered
--> $DIR/slice-patterns-exhaustiveness.rs:46:11
@ -122,7 +138,11 @@ LL | match s {
| ^ patterns `&[]` and `&[_, _, ..]` not covered
|
= note: the matched value is of type `&[bool]`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ &[true] => {}
LL + &[] | &[_, _, ..] => todo!()
|
error[E0004]: non-exhaustive patterns: `&[]` and `&[_, _, ..]` not covered
--> $DIR/slice-patterns-exhaustiveness.rs:89:11
@ -131,7 +151,11 @@ LL | match s {
| ^ patterns `&[]` and `&[_, _, ..]` not covered
|
= note: the matched value is of type `&[bool]`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ CONST => {}
LL + &[] | &[_, _, ..] => todo!()
|
error[E0004]: non-exhaustive patterns: `&[]` and `&[_, _, ..]` not covered
--> $DIR/slice-patterns-exhaustiveness.rs:93:11
@ -176,7 +200,11 @@ LL | match s1 {
| ^^ pattern `&[false]` not covered
|
= note: the matched value is of type `&[bool; 1]`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ CONST1 => {}
LL + &[false] => todo!()
|
error: aborting due to 20 previous errors

View file

@ -10,7 +10,11 @@ LL | Stable2,
| ------- not covered
|
= note: the matched value is of type `Foo`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ Foo::Stable => {}
LL + Stable2 | _ => todo!()
|
error[E0004]: non-exhaustive patterns: `_` not covered
--> $DIR/stable-gated-patterns.rs:13:11

View file

@ -5,7 +5,11 @@ LL | match data {
| ^^^^ pattern `&[_, ..]` not covered
|
= note: the matched value is of type `&[u8]`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ b"" => 1,
LL ~ &[_, ..] => todo!(),
|
error[E0004]: non-exhaustive patterns: `&[]`, `&[_]`, `&[_, _]` and 1 more not covered
--> $DIR/type_polymorphic_byte_str_literals.rs:23:11

View file

@ -5,7 +5,11 @@ LL | match sl {
| ^^ pattern `&[]` not covered
|
= note: the matched value is of type `&[u8]`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ [first, remainder @ ..] => {}
LL ~ &[] => todo!(),
|
error: aborting due to previous error

View file

@ -10,7 +10,11 @@ LL | Err(#[stable(feature = "rust1", since = "1.0.0")] E),
| --- not covered
|
= note: the matched value is of type `Result<u32, &Void>`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ Ok(n) => n,
LL ~ Err(_) => todo!(),
|
error[E0004]: non-exhaustive patterns: type `&Void` is non-empty
--> $DIR/uninhabited-matches-feature-gated.rs:15:19
@ -65,7 +69,11 @@ LL | let _ = match x {
| ^ pattern `&[_, ..]` not covered
|
= note: the matched value is of type `&[Void]`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ &[] => (),
LL ~ &[_, ..] => todo!(),
|
error[E0004]: non-exhaustive patterns: `Err(_)` not covered
--> $DIR/uninhabited-matches-feature-gated.rs:32:19
@ -79,7 +87,11 @@ LL | Err(#[stable(feature = "rust1", since = "1.0.0")] E),
| --- not covered
|
= note: the matched value is of type `Result<u32, Void>`
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
|
LL ~ Ok(x) => x,
LL ~ Err(_) => todo!(),
|
error[E0005]: refutable pattern in local binding: `Err(_)` not covered
--> $DIR/uninhabited-matches-feature-gated.rs:37:9