Skip to content

Commit 51504db

Browse files
committed
Adding suggestion for E0530
1 parent e78e747 commit 51504db

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

compiler/rustc_resolve/src/diagnostics.rs

+7
Original file line numberDiff line numberDiff line change
@@ -915,6 +915,13 @@ impl<'a> Resolver<'a> {
915915
span,
916916
format!("cannot be named the same as {} {}", article, shadowed_binding_descr),
917917
);
918+
err.span_suggestion(
919+
span,
920+
"try specify the pattern arguments",
921+
format!("{}(..)", name),
922+
Applicability::Unspecified,
923+
)
924+
.emit();
918925
let msg =
919926
format!("the {} `{}` is {} here", shadowed_binding_descr, name, participle);
920927
err.span_label(shadowed_binding_span, msg);

0 commit comments

Comments
 (0)