mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-24 12:54:00 +00:00
Adding suggestion for E0530
This commit is contained in:
parent
e78e747f53
commit
51504dbf01
@ -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…
Reference in New Issue
Block a user