Skip to content

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

Merged
merged 2 commits into from
Jun 11, 2022

Conversation

CorinJG
Copy link
Contributor

@CorinJG CorinJG commented Jun 10, 2022

… instead of snake_case for module names

@rust-highfive
Copy link
Contributor

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.

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Jun 10, 2022
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 10, 2022
@@ -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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

structs should be CamelCase.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

Copy link
Member

@compiler-errors compiler-errors left a 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!
Copy link
Member

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.

Copy link
Contributor

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)?

Copy link
Contributor Author

@CorinJG CorinJG Jun 10, 2022

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.

@compiler-errors
Copy link
Member

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Jun 10, 2022

📌 Commit 6227d89 has been approved by compiler-errors

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 10, 2022
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Jun 10, 2022
…=compiler-errors

nit: Fixed several error_codes/Exxxx.md messages which used UpperCamelCase…

… instead of snake_case for module names
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 10, 2022
…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
@bors bors merged commit 4ea862f into rust-lang:master Jun 11, 2022
@rustbot rustbot added this to the 1.63.0 milestone Jun 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants