-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Incorrect camel case warning #57319
Copy link
Copy link
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.
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.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Run the following program using Stable or Nightly:
https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=a8e0392ac3ef8c62c5cc66fddabeb564
The compiler tells us:
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.