@@ -406,13 +406,13 @@ fn resolve_struct_error<'sess, 'a>(resolver: &'sess Resolver,
406
406
err
407
407
}
408
408
ResolutionError :: BindingShadowsSomethingUnacceptable ( what_binding, name, binding) => {
409
- let ( shadows_what, article ) = ( binding. descr ( ) , binding . article ( ) ) ;
409
+ let shadows_what = binding. descr ( ) ;
410
410
let mut err = struct_span_err ! ( resolver. session, span, E0530 , "{}s cannot shadow {}s" ,
411
411
what_binding, shadows_what) ;
412
412
err. span_label ( span, format ! ( "cannot be named the same as {} {}" ,
413
- article, shadows_what) ) ;
413
+ binding . article( ) , shadows_what) ) ;
414
414
let participle = if binding. is_import ( ) { "imported" } else { "defined" } ;
415
- let msg = format ! ( "{} {} `{}` is {} here" , article , shadows_what, name, participle) ;
415
+ let msg = format ! ( "the {} `{}` is {} here" , shadows_what, name, participle) ;
416
416
err. span_label ( binding. span , msg) ;
417
417
err
418
418
}
@@ -4722,11 +4722,11 @@ impl<'a, 'crateloader: 'a> Resolver<'a, 'crateloader> {
4722
4722
`{ident}` to disambiguate", ident = ident) )
4723
4723
}
4724
4724
if b. is_extern_crate ( ) && self . session . rust_2018 ( ) {
4725
- help_msgs. push ( format ! ( "use `::{ident}` to refer to the {thing} unambiguously" ,
4725
+ help_msgs. push ( format ! ( "use `::{ident}` to refer to this {thing} unambiguously" ,
4726
4726
ident = ident, thing = b. descr( ) ) )
4727
4727
}
4728
4728
if misc == AmbiguityErrorMisc :: SuggestSelf {
4729
- help_msgs. push ( format ! ( "use `self::{ident}` to refer to the {thing} unambiguously" ,
4729
+ help_msgs. push ( format ! ( "use `self::{ident}` to refer to this {thing} unambiguously" ,
4730
4730
ident = ident, thing = b. descr( ) ) )
4731
4731
}
4732
4732
0 commit comments