mirror of
https://github.com/rust-lang/rust.git
synced 2026-06-01 22:18:23 +03:00
Adding suggestion for E0530
This commit is contained in:
@@ -915,6 +915,13 @@ pub(crate) fn into_struct_error(
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user