about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFelix S. Klock II <pnkfelix@pnkfx.org>2013-10-01 03:10:19 +0200
committerFelix S. Klock II <pnkfelix@pnkfx.org>2013-10-01 03:10:19 +0200
commit155857f5488f2b6ca04c3abe6ac22833028c1497 (patch)
treeef5b27d8e2c89a2e689f967473aed06505f141a5
parent8d6f4c207a5a9cf8721d4cd2c884390eb3d5e61f (diff)
downloadrust-155857f5488f2b6ca04c3abe6ac22833028c1497.tar.gz
rust-155857f5488f2b6ca04c3abe6ac22833028c1497.zip
Revise error message to use phrase "all caps" instead of "uppercase".
This is to clarify that the lint is checking for THIS_THING and not This.
-rw-r--r--src/librustc/middle/check_match.rs2
-rw-r--r--src/librustc/middle/lint.rs2
-rw-r--r--src/test/compile-fail/match-static-const-lc.rs4
3 files changed, 4 insertions, 4 deletions
diff --git a/src/librustc/middle/check_match.rs b/src/librustc/middle/check_match.rs
index 573d2a529d4..4856bb6c7fc 100644
--- a/src/librustc/middle/check_match.rs
+++ b/src/librustc/middle/check_match.rs
@@ -137,7 +137,7 @@ pub fn check_arms(cx: &MatchCheckCtxt, arms: &[Arm]) {
 
             // Lint for constants that look like binding identifiers (#7526)
             let pat_matches_non_uppercase_static: &fn(@Pat) = |p| {
-                let msg = "static constant in pattern should have an uppercase identifier";
+                let msg = "static constant in pattern should be all caps";
                 match (&p.node, cx.tcx.def_map.find(&p.id)) {
                     (&PatIdent(_, ref path, _), Some(&DefStatic(_, false))) => {
                         // last identifier alone is right choice for this lint.
diff --git a/src/librustc/middle/lint.rs b/src/librustc/middle/lint.rs
index 340cf361a08..6f022aa31bd 100644
--- a/src/librustc/middle/lint.rs
+++ b/src/librustc/middle/lint.rs
@@ -213,7 +213,7 @@ static lint_table: &'static [(&'static str, LintSpec)] = &[
     ("non_uppercase_pattern_statics",
      LintSpec {
          lint: non_uppercase_pattern_statics,
-         desc: "static constants in match patterns should be uppercased",
+         desc: "static constants in match patterns should be all caps",
          default: warn
      }),
 
diff --git a/src/test/compile-fail/match-static-const-lc.rs b/src/test/compile-fail/match-static-const-lc.rs
index 02be27b7ce2..4e9203496de 100644
--- a/src/test/compile-fail/match-static-const-lc.rs
+++ b/src/test/compile-fail/match-static-const-lc.rs
@@ -17,7 +17,7 @@ pub static a : int = 97;
 fn f() {
     let r = match (0,0) {
         (0, a) => 0,
-        //~^ ERROR static constant in pattern should have an uppercase id
+        //~^ ERROR static constant in pattern should be all caps
         (x, y) => 1 + x + y,
     };
     assert!(r == 1);
@@ -31,7 +31,7 @@ fn g() {
     use m::aha;
     let r = match (0,0) {
         (0, aha) => 0,
-        //~^ ERROR static constant in pattern should have an uppercase id
+        //~^ ERROR static constant in pattern should be all caps
         (x, y)   => 1 + x + y,
     };
     assert!(r == 1);