diff options
| author | Michael Goulet <michael@errs.io> | 2022-09-03 03:01:35 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2022-09-03 08:11:17 +0000 |
| commit | be53bd838097a835ae7486d8994d721225782bf4 (patch) | |
| tree | 5a7838b58f1d89c1e3ebb08f6055a332cb329781 /src/test/ui/match | |
| parent | 0421444f8fa221864418c57603a4080f974849a4 (diff) | |
| download | rust-be53bd838097a835ae7486d8994d721225782bf4.tar.gz rust-be53bd838097a835ae7486d8994d721225782bf4.zip | |
Include enum path in variant suggestion
Diffstat (limited to 'src/test/ui/match')
| -rw-r--r-- | src/test/ui/match/match_non_exhaustive.rs | 2 | ||||
| -rw-r--r-- | src/test/ui/match/match_non_exhaustive.stderr | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/test/ui/match/match_non_exhaustive.rs b/src/test/ui/match/match_non_exhaustive.rs index 8219f0eb135..f162dd60f50 100644 --- a/src/test/ui/match/match_non_exhaustive.rs +++ b/src/test/ui/match/match_non_exhaustive.rs @@ -21,7 +21,7 @@ fn main() { match l { L::A => (), L::B => () }; // (except if the match is already non-exhaustive) match l { L::A => () }; - //~^ ERROR: non-exhaustive patterns: `B` not covered [E0004] + //~^ ERROR: non-exhaustive patterns: `L::B` not covered [E0004] // E1 is not visibly uninhabited from here let (e1, e2) = bar(); diff --git a/src/test/ui/match/match_non_exhaustive.stderr b/src/test/ui/match/match_non_exhaustive.stderr index 9d92f8fdbb4..46ee8d5179e 100644 --- a/src/test/ui/match/match_non_exhaustive.stderr +++ b/src/test/ui/match/match_non_exhaustive.stderr @@ -1,8 +1,8 @@ -error[E0004]: non-exhaustive patterns: `B` not covered +error[E0004]: non-exhaustive patterns: `L::B` not covered --> $DIR/match_non_exhaustive.rs:23:11 | LL | match l { L::A => () }; - | ^ pattern `B` not covered + | ^ pattern `L::B` not covered | note: `L` defined here --> $DIR/match_non_exhaustive.rs:10:13 @@ -12,8 +12,8 @@ LL | enum L { A, B } = note: the matched value is of type `L` help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown | -LL | match l { L::A => (), B => todo!() }; - | ++++++++++++++ +LL | match l { L::A => (), L::B => todo!() }; + | +++++++++++++++++ error[E0004]: non-exhaustive patterns: type `E1` is non-empty --> $DIR/match_non_exhaustive.rs:28:11 |
