-
Notifications
You must be signed in to change notification settings - Fork 13.3k
nit: Fixed several error_codes/Exxxx.md messages which used UpperCamelCase… #97941
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… instead of snake_case for module names
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @compiler-errors (or someone else) soon. Please see the contribution instructions for more information. |
@@ -3,21 +3,21 @@ Something other than a module was found in visibility scope. | |||
Erroneous code example: | |||
|
|||
```compile_fail,E0577,edition2018 | |||
pub struct Sea; | |||
pub struct sea; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
struct
s should be CamelCase.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please fix the two comments, the rest look fine
|
||
let sauron = Mordor { x: () }; // error! | ||
let sauron = mordor { x: () }; // error! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one should stay as-is, because the error is trying to describe how someone tried to use a module as a struct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's the usage of a module in struct position that's problematic, so I'd argue the module is correctly snake_case... but I guess it's just a matter of perspective: did they mean to write struct Mordor {}
or did they mean to write let sauron = Sauron { x: () };
(or similar)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If someone tried to use a module as a struct, it's possible they made a naming convention error too. (Maybe they used snake_case for the module and the struct!). It's not clear to me that violating naming conventions in the error description is helpful though.
@bors r+ rollup |
📌 Commit 6227d89 has been approved by |
…=compiler-errors nit: Fixed several error_codes/Exxxx.md messages which used UpperCamelCase… … instead of snake_case for module names
…askrgr Rollup of 6 pull requests Successful merges: - rust-lang#93331 (refactor write_output_file to merge two invocation paths into one.) - rust-lang#97928 (Removes debug settings from wasm32_unknown_emscripten default link args) - rust-lang#97940 (Use relative links instead of linking to doc.rust-lang.org when possible) - rust-lang#97941 (nit: Fixed several error_codes/Exxxx.md messages which used UpperCamelCase…) - rust-lang#97953 (Add regression test for rust-lang#54378) - rust-lang#97957 (Make `std::` prefix suggestion test `run-rustfix`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
… instead of snake_case for module names