diff --git a/src/format.rs b/src/format.rs index 704b4e8e8..901cd3f7a 100644 --- a/src/format.rs +++ b/src/format.rs @@ -44,14 +44,14 @@ impl LateLintPass for FormatMacLint { // ensure the format argument is `{}` ie. Display with no fancy option check_arg_is_display(&args[1]) ], { - span_lint(cx, USELESS_FORMAT, span, &"useless use of `format!`"); + span_lint(cx, USELESS_FORMAT, span, "useless use of `format!`"); }} } // `format!("foo")` expansion contains `match () { () => [], }` ExprMatch(ref matchee, _, _) => { if let ExprTup(ref tup) = matchee.node { if tup.is_empty() { - span_lint(cx, USELESS_FORMAT, span, &"useless use of `format!`"); + span_lint(cx, USELESS_FORMAT, span, "useless use of `format!`"); } } } diff --git a/src/loops.rs b/src/loops.rs index fff73f907..15f0e51f3 100644 --- a/src/loops.rs +++ b/src/loops.rs @@ -317,8 +317,8 @@ impl LateLintPass for LoopsPass { span_lint(cx, UNUSED_COLLECT, expr.span, - &"you are collect()ing an iterator and throwing away the result. \ - Consider using an explicit for loop to exhaust the iterator"); + "you are collect()ing an iterator and throwing away the result. \ + Consider using an explicit for loop to exhaust the iterator"); } } } diff --git a/src/methods.rs b/src/methods.rs index 1d529e175..c67e2eade 100644 --- a/src/methods.rs +++ b/src/methods.rs @@ -589,7 +589,7 @@ fn lint_extend(cx: &LateContext, expr: &Expr, args: &MethodArgs) { span_lint(cx, EXTEND_FROM_SLICE, expr.span, - &"use of `extend` to extend a Vec by a slice") + "use of `extend` to extend a Vec by a slice") .span_suggestion(expr.span, "try this", format!("{}.extend_from_slice({}{})", diff --git a/src/regex.rs b/src/regex.rs index 25c7260ab..745d685ec 100644 --- a/src/regex.rs +++ b/src/regex.rs @@ -105,7 +105,7 @@ impl LateLintPass for RegexPass { Ok(r) => { if let Some(repl) = is_trivial_regex(&r) { span_help_and_lint(cx, TRIVIAL_REGEX, args[0].span, - &"trivial regex", + "trivial regex", &format!("consider using {}", repl)); } } @@ -123,7 +123,7 @@ impl LateLintPass for RegexPass { Ok(r) => { if let Some(repl) = is_trivial_regex(&r) { span_help_and_lint(cx, TRIVIAL_REGEX, args[0].span, - &"trivial regex", + "trivial regex", &format!("consider using {}", repl)); } } diff --git a/src/types.rs b/src/types.rs index 7521bc480..eec8bd63e 100644 --- a/src/types.rs +++ b/src/types.rs @@ -496,7 +496,7 @@ fn check_type(cx: &LateContext, ty: &Ty) { span_lint(cx, TYPE_COMPLEXITY, ty.span, - &"very complex type used. Consider factoring parts into `type` definitions"); + "very complex type used. Consider factoring parts into `type` definitions"); } }