]> git.lizzy.rs Git - rust.git/blobdiff - src/strings.rs
update_lints: add a check mode for travis runs
[rust.git] / src / strings.rs
index 84512dfe7f8e393ebd9947042596004a338c255f..7b7bab49b5d7a0d9b70e9de1a9336acf48088738 100644 (file)
 declare_lint! {
     pub STRING_ADD_ASSIGN,
     Allow,
-    "expressions of the form `x = x + ..` where x is a `String`"
+    "using `x = x + ..` where x is a `String`; suggests using `push_str()` instead"
 }
 
 declare_lint! {
     pub STRING_ADD,
     Allow,
-    "using `x = x + ..` where x is a `String`; suggests using `push_str()` instead"
+    "using `x + ..` where x is a `String`; suggests using `push_str()` instead"
 }
 
 #[derive(Copy, Clone)]
@@ -48,13 +48,13 @@ fn check_expr(&mut self, cx: &Context, e: &Expr) {
                 //TODO check for duplicates
                  span_lint(cx, STRING_ADD, e.span,
                         "you added something to a string. \
-                        Consider using `String::push_str()` instead.")
+                         Consider using `String::push_str()` instead")
             }
         } else if let &ExprAssign(ref target, ref  src) = &e.node {
             if is_string(cx, target) && is_add(src, target) {
                 span_lint(cx, STRING_ADD_ASSIGN, e.span,
                     "you assigned the result of adding something to this string. \
-                    Consider using `String::push_str()` instead.")
+                     Consider using `String::push_str()` instead")
             }
         }
     }