]> git.lizzy.rs Git - rust.git/commitdiff
grammar
authorAndre Bogus <bogusandre@gmail.com>
Wed, 12 Aug 2015 19:17:21 +0000 (21:17 +0200)
committerllogiq <bogusandre@gmail.com>
Thu, 13 Aug 2015 09:38:39 +0000 (11:38 +0200)
src/strings.rs

index 85e6501d33628a7ff492f165f9584dc6b702106a..50971962f907fb3664ed15cce9d4d5698841d53c 100644 (file)
 
 declare_lint! {
     pub STRING_ADD_ASSIGN,
-    Warn,
-    "Warn on `x = x + ..` where x is a `String`"
+    Allow,
+    "expressions of the form `x = x + ..` where x is a `String`"
 }
 
 declare_lint! {
     pub STRING_ADD,
     Allow,
-    "Warn on `x + ..` where x is a `String`"
+    "expressions of the form on `x + ..` where x is a `String`"
 }
 
 #[derive(Copy, Clone)]
@@ -47,14 +47,14 @@ fn check_expr(&mut self, cx: &Context, e: &Expr) {
                 }
                 //TODO check for duplicates
                  span_lint(cx, STRING_ADD, e.span,
-                        "you add something to a string. \
+                        "you added something to a string. \
                         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 assign the result of adding something to this string. \
-                    Consider using `String::push_str()` instead")
+                    "you assigned the result of adding something to this string. \
+                    Consider using `String::push_str()` instead.")
             }
         }
     }