diff --git a/src/librustc/middle/check_match.rs b/src/librustc/middle/check_match.rs index 573d2a529d4b..4856bb6c7fc0 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 340cf361a08d..6f022aa31bd7 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 02be27b7ce28..4e9203496de3 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);