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.
This commit is contained in:
Felix S. Klock II 2013-10-01 03:10:19 +02:00
parent 8d6f4c207a
commit 155857f548
3 changed files with 4 additions and 4 deletions

View File

@ -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.

View File

@ -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
}),

View File

@ -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);