1010
1111#![ allow( non_snake_case) ]
1212
13- register_diagnostic ! { E0001 , r##"
13+ register_long_diagnostics ! {
14+ E0001 : r##"
1415 This error suggests that the expression arm corresponding to the noted pattern
1516 will never be reached as for all possible values of the expression being matched,
1617 one of the preceeding patterns will match.
1718
1819 This means that perhaps some of the preceeding patterns are too general, this
1920 one is too specific or the ordering is incorrect.
20- "## }
21+ "## ,
22+
23+ E0003 : r##"
24+ Not-a-Number (NaN) values can not be compared for equality and hence can never match
25+ the input to a match expression. To match against NaN values, you should instead use
26+ the `is_nan` method in a guard, as in: x if x.is_nan() => ...
27+ "## ,
28+
29+ E0004 : r##"
30+ This error indicates that the compiler can not guarantee a matching pattern for one
31+ or more possible inputs to a match expression. Guaranteed matches are required in order
32+ to assign values to match expressions, or alternatively, determine the flow of execution.
33+
34+ If you encounter this error you must alter your patterns so that every possible value of
35+ the input type is matched. For types with a small number of variants (like enums) you
36+ should probably cover all cases explicitly. Alternatively, the underscore `_` wildcard
37+ pattern can be added after all other patterns to match "anything else".
38+ "## ,
39+
40+ // FIXME: Remove duplication here?
41+ E0005 : r##"
42+ Patterns used to bind names must be irrefutable, that is, they must guarantee that a
43+ name will be extracted in all cases. If you encounter this error you probably need
44+ to use a `match` or `if let` to deal with the possibility of failure.
45+ "## ,
46+
47+ E0006 : r##"
48+ Patterns used to bind names must be irrefutable, that is, they must guarantee that a
49+ name will be extracted in all cases. If you encounter this error you probably need
50+ to use a `match` or `if let` to deal with the possibility of failure.
51+ "##
52+ }
2153
2254register_diagnostics ! {
2355 E0002 ,
24- E0003 ,
25- E0004 ,
26- E0005 ,
27- E0006 ,
2856 E0007 ,
2957 E0008 ,
3058 E0009 ,
3159 E0010 ,
3260 E0011 ,
3361 E0012 ,
34- E0013 ,
3562 E0014 ,
3663 E0015 ,
3764 E0016 ,
@@ -49,24 +76,58 @@ register_diagnostics! {
4976 E0137 ,
5077 E0138 ,
5178 E0139 ,
52- E0140 ,
5379 E0152 ,
54- E0153 ,
55- E0157 ,
5680 E0158 ,
5781 E0161 ,
5882 E0162 ,
5983 E0165 ,
60- E0166 ,
61- E0167 ,
62- E0168 ,
63- E0169 ,
6484 E0170 ,
65- E0171 ,
66- E0172 ,
67- E0173 ,
68- E0174 ,
69- E0177 ,
70- E0178 ,
71- E0179
85+ E0261 , // use of undeclared lifetime name
86+ E0262 , // illegal lifetime parameter name
87+ E0263 , // lifetime name declared twice in same scope
88+ E0264 , // unknown external lang item
89+ E0265 , // recursive constant
90+ E0266 , // expected item
91+ E0267 , // thing inside of a closure
92+ E0268 , // thing outside of a loop
93+ E0269 , // not all control paths return a value
94+ E0270 , // computation may converge in a function marked as diverging
95+ E0271 , // type mismatch resolving
96+ E0272 , // rustc_on_unimplemented attribute refers to non-existent type parameter
97+ E0273 , // rustc_on_unimplemented must have named format arguments
98+ E0274 , // rustc_on_unimplemented must have a value
99+ E0275 , // overflow evaluating requirement
100+ E0276 , // requirement appears on impl method but not on corresponding trait method
101+ E0277 , // trait is not implemented for type
102+ E0278 , // requirement is not satisfied
103+ E0279 , // requirement is not satisfied
104+ E0280 , // requirement is not satisfied
105+ E0281 , // type implements trait but other trait is required
106+ E0282 , // unable to infer enough type information about
107+ E0283 , // cannot resolve type
108+ E0284 , // cannot resolve type
109+ E0285 , // overflow evaluation builtin bounds
110+ E0296 , // malformed recursion limit attribute
111+ E0297 , // refutable pattern in for loop binding
112+ E0298 , // mismatched types between arms
113+ E0299 , // mismatched types between arms
114+ E0300 , // unexpanded macro
115+ E0301 , // cannot mutable borrow in a pattern guard
116+ E0302 , // cannot assign in a pattern guard
117+ E0303 , // pattern bindings are not allowed after an `@`
118+ E0304 , // expected signed integer constant
119+ E0305 , // expected constant
120+ E0306 , // expected positive integer for repeat count
121+ E0307 , // expected constant integer for repeat count
122+ E0308 ,
123+ E0309 , // thing may not live long enough
124+ E0310 , // thing may not live long enough
125+ E0311 , // thing may not live long enough
126+ E0312 , // lifetime of reference outlives lifetime of borrowed content
127+ E0313 , // lifetime of borrowed pointer outlives lifetime of captured variable
128+ E0314 , // closure outlives stack frame
129+ E0315 // cannot invoke closure outside of its lifetime
72130}
131+
132+ __build_diagnostic_array ! { DIAGNOSTICS }
133+
0 commit comments