-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Closed
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.
Description
Run the following program using Stable or Nightly:
The compiler tells us:
warning: type `userData` should have a camel case name such as `Userdata`
--> src/main.rs:1:1
|
1 | / struct userData
2 | | {
3 | | name: String,
4 | | age: u8,
5 | | weight: f32,
6 | | height: f32
7 | | }
| |_^
|
= note: #[warn(non_camel_case_types)] on by default
This is incorrect/confusing in 3 ways:
1.) userData is in fact camelCase.
2.) UserData would be PascalCase and this is the convention I've seen
3.) Userdata is neither... So even if for some strange reason we're considering PascalCase as camel case, the recommendation is neither.
Metadata
Metadata
Assignees
Labels
A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.