mirror of
https://github.com/rust-lang/rust.git
synced 2026-06-02 15:56:09 +03:00
Improve TOPLEVEL_REF_ARG message
This commit is contained in:
@@ -70,7 +70,7 @@ fn check_stmt(&mut self, cx: &LateContext, s: &Stmt) {
|
||||
span_lint_and_then(cx,
|
||||
TOPLEVEL_REF_ARG,
|
||||
l.pat.span,
|
||||
"`ref` on an entire `let` pattern is discouraged, take a reference with & instead",
|
||||
"`ref` on an entire `let` pattern is discouraged, take a reference with `&` instead",
|
||||
|db| {
|
||||
let init = &Sugg::hir(cx, init, "..");
|
||||
db.span_suggestion(s.span,
|
||||
|
||||
Reference in New Issue
Block a user