mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-01 03:03:40 +00:00
Cleanup
This commit is contained in:
parent
2a45a2ab6b
commit
139b977d9d
@ -149,7 +149,7 @@ impl EarlyLintPass for MiscEarly {
|
||||
"Try not to call a closure in the expression where it is declared.",
|
||||
|db| {
|
||||
if decl.inputs.is_empty() {
|
||||
let hint = format!("{}", snippet(cx, block.span, ".."));
|
||||
let hint = snippet(cx, block.span, "..").into_owned();
|
||||
db.span_suggestion(expr.span, "Try doing something like: ", hint);
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user