mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-24 04:46:58 +00:00
Adding suggestion for E0530
This commit is contained in:
parent
e78e747f53
commit
51504dbf01
@ -915,6 +915,13 @@ impl<'a> Resolver<'a> {
|
||||
span,
|
||||
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 =
|
||||
format!("the {} `{}` is {} here", shadowed_binding_descr, name, participle);
|
||||
err.span_label(shadowed_binding_span, msg);
|
||||
|
Loading…
Reference in New Issue
Block a user