File tree 2 files changed +33
-0
lines changed
2 files changed +33
-0
lines changed Original file line number Diff line number Diff line change
1
+ #[ derive( PartialEq , Eq ) ]
2
+ pub struct Tag ( pub Context , pub u16 ) ;
3
+
4
+ #[ derive( PartialEq , Eq ) ]
5
+ pub enum Context {
6
+ Tiff ,
7
+ Exif ,
8
+ }
9
+
10
+ impl Tag {
11
+ const ExifIFDPointer : Tag = Tag ( Context :: Tiff , 34665 ) ;
12
+ }
13
+
14
+ fn main ( ) {
15
+ match Tag :: ExifIFDPointer {
16
+ //~^ ERROR: non-exhaustive patterns: `Tag(Exif, _)` not covered
17
+ Tag :: ExifIFDPointer => { }
18
+ }
19
+ }
Original file line number Diff line number Diff line change
1
+ error[E0004]: non-exhaustive patterns: `Tag(Exif, _)` not covered
2
+ --> $DIR/issue-50900.rs:15:11
3
+ |
4
+ LL | pub struct Tag(pub Context, pub u16);
5
+ | ------------------------------------- `Tag` defined here
6
+ ...
7
+ LL | match Tag::ExifIFDPointer {
8
+ | ^^^^^^^^^^^^^^^^^^^ pattern `Tag(Exif, _)` not covered
9
+ |
10
+ = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
11
+
12
+ error: aborting due to previous error
13
+
14
+ For more information about this error, try `rustc --explain E0004`.
You can’t perform that action at this time.
0 commit comments