| 1 |
error[E0004]: non-exhaustive patterns: `__Phantom(_)` not covered |
| 2 |
--> tests/ui/pattern-match.rs:9:11 |
| 3 |
| |
| 4 |
9 | match phantom { |
| 5 |
| ^^^^^^^ pattern `__Phantom(_)` not covered |
| 6 |
| |
| 7 |
note: `MyPhantom<u8>` defined here |
| 8 |
--> tests/ui/pattern-match.rs:3:1 |
| 9 |
| |
| 10 |
3 | #[phantom] |
| 11 |
| ^^^^^^^^^^ not covered |
| 12 |
4 | struct MyPhantom<T: ?Sized>; |
| 13 |
| --------- |
| 14 |
= note: the matched value is of type `MyPhantom<u8>` |
| 15 |
= note: this error originates in the attribute macro `phantom` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 16 |
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown |
| 17 |
| |
| 18 |
10~ MyPhantom => {} |
| 19 |
11+ __Phantom(_) => todo!() |
| 20 |
| |
| 21 |
|
| 22 |
error[E0004]: non-exhaustive patterns: `__Phantom(_)` not covered |
| 23 |
--> tests/ui/pattern-match.rs:13:11 |
| 24 |
| |
| 25 |
13 | match phantom { |
| 26 |
| ^^^^^^^ pattern `__Phantom(_)` not covered |
| 27 |
| |
| 28 |
note: `MyPhantom<u8>` defined here |
| 29 |
--> tests/ui/pattern-match.rs:3:1 |
| 30 |
| |
| 31 |
3 | #[phantom] |
| 32 |
| ^^^^^^^^^^ not covered |
| 33 |
4 | struct MyPhantom<T: ?Sized>; |
| 34 |
| --------- |
| 35 |
= note: the matched value is of type `MyPhantom<u8>` |
| 36 |
= note: this error originates in the attribute macro `phantom` (in Nightly builds, run with -Z macro-backtrace for more info) |
| 37 |
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown |
| 38 |
| |
| 39 |
14 ~ MyPhantom::<u8> => {} |
| 40 |
15 + __Phantom(_) => todo!() |
| 41 |
| |