This commit is contained in:
mcarton 2016-07-01 21:01:56 +02:00
parent 2a45a2ab6b
commit 139b977d9d
No known key found for this signature in database
GPG Key ID: 5E427C794CBA45E8

View File

@ -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);
}
});