@@ -141,7 +141,7 @@ enum ResolutionError<'a> {
141141 /// error E0413: declaration shadows an enum variant or unit-like struct in scope
142142 DeclarationShadowsEnumVariantOrUnitLikeStruct ( Name ) ,
143143 /// error E0414: only irrefutable patterns allowed here
144- OnlyIrrefutablePatternsAllowedHere ( Name ) ,
144+ ConstantForIrrefutableBinding ( Name ) ,
145145 /// error E0415: identifier is bound more than once in this parameter list
146146 IdentifierBoundMoreThanOnceInParameterList ( & ' a str ) ,
147147 /// error E0416: identifier is bound more than once in the same pattern
@@ -323,11 +323,11 @@ fn resolve_struct_error<'b, 'a: 'b, 'tcx: 'a>(resolver: &'b Resolver<'a, 'tcx>,
323323 or unit-like struct in scope",
324324 name)
325325 }
326- ResolutionError :: OnlyIrrefutablePatternsAllowedHere ( name) => {
326+ ResolutionError :: ConstantForIrrefutableBinding ( name) => {
327327 let mut err = struct_span_err ! ( resolver. session,
328328 span,
329329 E0414 ,
330- "only irrefutable patterns allowed here " ) ;
330+ "variable bindings cannot shadow constants " ) ;
331331 err. span_note ( span,
332332 "there already is a constant in scope sharing the same \
333333 name as this pattern") ;
@@ -2233,7 +2233,7 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
22332233 resolve_error (
22342234 self ,
22352235 pattern. span ,
2236- ResolutionError :: OnlyIrrefutablePatternsAllowedHere ( name)
2236+ ResolutionError :: ConstantForIrrefutableBinding ( name)
22372237 ) ;
22382238 self . record_def ( pattern. id , err_path_resolution ( ) ) ;
22392239 }
0 commit comments