Skip to content

Commit

Permalink
Change camel case warning to upper camel case
Browse files Browse the repository at this point in the history
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
  • Loading branch information
tcullum-gpsw committed Jan 4, 2019
1 parent d6d32ac commit 7821ee2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/librustc_lint/nonstandard_style.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ impl NonCamelCaseTypes {
if !is_camel_case(name) {
let c = to_camel_case(&name.as_str());
let m = if c.is_empty() {
format!("{} `{}` should have a camel case name such as `CamelCase`", sort, name)
format!("{} `{}` should have an upper camel case name such as `CamelCase`", sort, name)
} else {
format!("{} `{}` should have a camel case name such as `{}`", sort, name, c)
format!("{} `{}` should have an upper camel case name such as `{}`", sort, name, c)
};
cx.span_lint(NON_CAMEL_CASE_TYPES, span, &m);
}
Expand Down

0 comments on commit 7821ee2

Please sign in to comment.