Adding suggestion for E0530
This commit is contained in:
parent
e78e747f53
commit
51504dbf01
1 changed files with 7 additions and 0 deletions
|
@ -915,6 +915,13 @@ impl<'a> Resolver<'a> {
|
||||||
span,
|
span,
|
||||||
format!("cannot be named the same as {} {}", article, shadowed_binding_descr),
|
format!("cannot be named the same as {} {}", article, shadowed_binding_descr),
|
||||||
);
|
);
|
||||||
|
err.span_suggestion(
|
||||||
|
span,
|
||||||
|
"try specify the pattern arguments",
|
||||||
|
format!("{}(..)", name),
|
||||||
|
Applicability::Unspecified,
|
||||||
|
)
|
||||||
|
.emit();
|
||||||
let msg =
|
let msg =
|
||||||
format!("the {} `{}` is {} here", shadowed_binding_descr, name, participle);
|
format!("the {} `{}` is {} here", shadowed_binding_descr, name, participle);
|
||||||
err.span_label(shadowed_binding_span, msg);
|
err.span_label(shadowed_binding_span, msg);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue