]> git.lizzy.rs Git - rust.git/commitdiff
Change 'must' to 'should' in non_camel_case_types message
authorBrian Anderson <banderson@mozilla.com>
Tue, 18 Sep 2012 18:57:03 +0000 (11:57 -0700)
committerBrian Anderson <banderson@mozilla.com>
Tue, 18 Sep 2012 19:18:00 +0000 (12:18 -0700)
src/rustc/middle/lint.rs
src/test/compile-fail/lint-non-camel-case-types.rs

index a10504a987a63970798956d04fb965835676c934..889bd085e332233b07a0b1f0d8929dbe48079545 100644 (file)
@@ -156,7 +156,7 @@ fn get_lint_dict() -> lint_dict {
 
         (~"non_camel_case_types",
          @{lint: non_camel_case_types,
-           desc: ~"types, variants and traits must have camel case names",
+           desc: ~"types, variants and traits should have camel case names",
            default: warn}),
 
         (~"managed_heap_memory",
@@ -605,7 +605,8 @@ fn check_case(cx: ty::ctxt, ident: ast::ident,
         if !is_camel_case(cx, ident) {
             cx.sess.span_lint(
                 non_camel_case_types, expr_id, item_id, span,
-                ~"type, variant, or trait must be camel case");
+                ~"type, variant, or trait should have \
+                  a camel case identifier");
         }
     }
 
index 04dc2cebdb62a708700073f5ebc4b0528af332e8..6d9777fda4296fe327236d3d7a87fdff434e7ff9 100644 (file)
@@ -1,24 +1,24 @@
 #[forbid(non_camel_case_types)];
 
-struct foo { //~ ERROR type, variant, or trait must be camel case
+struct foo { //~ ERROR type, variant, or trait should have a camel case identifier
     bar: int,
 }
 
-enum foo2 { //~ ERROR type, variant, or trait must be camel case
+enum foo2 { //~ ERROR type, variant, or trait should have a camel case identifier
     Bar
 }
 
-struct foo3 { //~ ERROR type, variant, or trait must be camel case
+struct foo3 { //~ ERROR type, variant, or trait should have a camel case identifier
     bar: int
 }
 
-type foo4 = int; //~ ERROR type, variant, or trait must be camel case
+type foo4 = int; //~ ERROR type, variant, or trait should have a camel case identifier
 
 enum Foo5 {
-    bar //~ ERROR type, variant, or trait must be camel case
+    bar //~ ERROR type, variant, or trait should have a camel case identifier
 }
 
-trait foo6 { //~ ERROR type, variant, or trait must be camel case
+trait foo6 { //~ ERROR type, variant, or trait should have a camel case identifier
 }
 
 fn main() { }
\ No newline at end of file