Skip to content

Commit 7821ee2

Browse files
authored
Change camel case warning to upper camel case
Rust structs should be named in upper camel case aka PascalCase. "Upper camel case" was decided upon as the preferred phrase over PascalCase per: rust-lang/rfcs#2389
1 parent d6d32ac commit 7821ee2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/librustc_lint/nonstandard_style.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@ impl NonCamelCaseTypes {
8989
if !is_camel_case(name) {
9090
let c = to_camel_case(&name.as_str());
9191
let m = if c.is_empty() {
92-
format!("{} `{}` should have a camel case name such as `CamelCase`", sort, name)
92+
format!("{} `{}` should have an upper camel case name such as `CamelCase`", sort, name)
9393
} else {
94-
format!("{} `{}` should have a camel case name such as `{}`", sort, name, c)
94+
format!("{} `{}` should have an upper camel case name such as `{}`", sort, name, c)
9595
};
9696
cx.span_lint(NON_CAMEL_CASE_TYPES, span, &m);
9797
}

0 commit comments

Comments
 (0)