File tree Expand file tree Collapse file tree 3 files changed +2
-3
lines changed Expand file tree Collapse file tree 3 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ use syntax_pos::MultiSpan;
16
16
/// An enum representing a diagnostic level.
17
17
#[ unstable( feature = "proc_macro_diagnostic" , issue = "38356" ) ]
18
18
#[ derive( Copy , Clone , Debug ) ]
19
+ #[ non_exhaustive]
19
20
pub enum Level {
20
21
/// An error.
21
22
Error ,
@@ -25,8 +26,6 @@ pub enum Level {
25
26
Note ,
26
27
/// A help message.
27
28
Help ,
28
- #[ doc( hidden) ]
29
- __Nonexhaustive,
30
29
}
31
30
32
31
/// A structure representing a diagnostic message and associated children
Original file line number Diff line number Diff line change 36
36
#![ feature( staged_api) ]
37
37
#![ feature( lang_items) ]
38
38
#![ feature( optin_builtin_traits) ]
39
+ #![ feature( non_exhaustive) ]
39
40
40
41
#![ recursion_limit="256" ]
41
42
Original file line number Diff line number Diff line change @@ -278,7 +278,6 @@ impl Level {
278
278
Level :: Warning => errors:: Level :: Warning ,
279
279
Level :: Note => errors:: Level :: Note ,
280
280
Level :: Help => errors:: Level :: Help ,
281
- Level :: __Nonexhaustive => unreachable ! ( "Level::__Nonexhaustive" ) ,
282
281
}
283
282
}
284
283
}
You can’t perform that action at this time.
0 commit comments