Add a test for a shadow corner case
This commit is contained in:
parent
9a3f53dee6
commit
e50cfa7e77
2 changed files with 4 additions and 1 deletions
|
|
@ -262,7 +262,7 @@ fn lint_shadow<T>(cx: &LateContext, name: Name, span: Span, pattern_span: Span,
|
|||
span_lint_and_then(cx,
|
||||
SHADOW_UNRELATED,
|
||||
span,
|
||||
&format!("{} shadows a previous declaration", snippet(cx, pattern_span, "_")),
|
||||
&format!("`{}` shadows a previous declaration", snippet(cx, pattern_span, "_")),
|
||||
|db| { db.span_note(prev_span, "previous binding is here"); });
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue