Tweak wording
This commit is contained in:
parent
781e86477c
commit
20c622e456
4 changed files with 6 additions and 5 deletions
|
@ -191,10 +191,11 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
|
|||
.collect::<Vec<_>>()[..]
|
||||
{
|
||||
let trait_name = self.tcx().def_path_str(*best_trait);
|
||||
let an = if suggested_name != assoc_name.name { "a similarly named" } else { "an" };
|
||||
err.span_label(
|
||||
assoc_name.span,
|
||||
format!(
|
||||
"there is a similarly named associated type `{suggested_name}` in the \
|
||||
"there is {an} associated type `{suggested_name}` in the \
|
||||
trait `{trait_name}`",
|
||||
),
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue