nit: Fixed several error_codes/Exxxx.md messages which used UpperCamelCase…#97941
nit: Fixed several error_codes/Exxxx.md messages which used UpperCamelCase…#97941bors merged 2 commits intorust-lang:masterfrom
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. |
|
|
||
| ```compile_fail,E0577,edition2018 | ||
| pub struct Sea; | ||
| pub struct sea; |
There was a problem hiding this comment.
structs should be CamelCase.
compiler-errors
left a comment
There was a problem hiding this comment.
please fix the two comments, the rest look fine
| mod mordor {} | ||
|
|
||
| let sauron = Mordor { x: () }; // error! | ||
| let sauron = mordor { x: () }; // error! |
There was a problem hiding this comment.
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.
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.
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