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:
parent
8d6f4c207a
commit
155857f548
@ -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.
|
||||
|
@ -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
|
||||
}),
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user