Skip to content

Conversation

@Daulox92
Copy link

@Daulox92 Daulox92 commented Jan 5, 2025

Changes in compiler/rustc_session/src/errors.rs:

  • #[diag(session_invalid_character_in_create_name)]
  • #[diag(session_invalid_character_in_crate_name)]

Old word: "create" (verb meaning "to make")
New word: "crate" (Rust term for a compilation unit)

Reason:
The diagnostic attribute contained a typo using "create" instead of "crate". This is incorrect because the diagnostic is specifically about checking invalid characters in crate names, and "crate" is the proper Rust terminology for a compilation unit.

Testing:

  • Compile the compiler
  • Verify diagnostic triggers correctly
  • Check error message displays properly

@rustbot
Copy link
Collaborator

rustbot commented Jan 5, 2025

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @jieyouxu (or someone else) some time within the next two weeks.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jan 5, 2025
@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-llvm-18 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
#21 exporting to docker image format
#21 sending tarball 27.7s done
#21 DONE 40.3s
##[endgroup]
Setting extra environment values for docker:  --env ENABLE_GCC_CODEGEN=1 --env GCC_EXEC_PREFIX=/usr/lib/gcc/
[CI_JOB_NAME=x86_64-gnu-llvm-18]
debug: `DISABLE_CI_RUSTC_IF_INCOMPATIBLE` configured.
---
sccache: Starting the server...
##[group]Configure the build
configure: processing command line
configure: 
configure: build.configure-args := ['--build=x86_64-unknown-linux-gnu', '--llvm-root=/usr/lib/llvm-18', '--enable-llvm-link-shared', '--set', 'rust.randomize-layout=true', '--set', 'rust.thin-lto-import-instr-limit=10', '--enable-verbose-configure', '--enable-sccache', '--disable-manage-submodules', '--enable-locked-deps', '--enable-cargo-native-static', '--set', 'rust.codegen-units-std=1', '--set', 'dist.compression-profile=balanced', '--dist-compression-formats=xz', '--set', 'rust.lld=false', '--disable-dist-src', '--release-channel=nightly', '--enable-debug-assertions', '--enable-overflow-checks', '--enable-llvm-assertions', '--set', 'rust.verify-llvm-ir', '--set', 'rust.codegen-backends=llvm,cranelift,gcc', '--set', 'llvm.static-libstdcpp', '--enable-new-symbol-mangling']
configure: target.x86_64-unknown-linux-gnu.llvm-config := /usr/lib/llvm-18/bin/llvm-config
configure: llvm.link-shared     := True
configure: rust.randomize-layout := True
configure: rust.thin-lto-import-instr-limit := 10
---
    |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: a constant with a similar name exists: `session_invalid_character_in_create_name`
    |
   ::: compiler/rustc_session/src/lib.rs:32:1
    |
32  | rustc_fluent_macro::fluent_messages! { "../messages.ftl" }

error[E0425]: cannot find value `session_invalid_character_in_crate_name_help` in module `crate::fluent_generated`
   --> compiler/rustc_session/src/errors.rs:249:12
    |
    |
249 |     #[help(session_invalid_character_in_crate_name_help)]
    |
   ::: compiler/rustc_session/src/lib.rs:32:1
    |
    |
32  | rustc_fluent_macro::fluent_messages! { "../messages.ftl" }
    | ------------------------------------ similarly named constant `session_invalid_character_in_create_name_help` defined here
For more information about this error, try `rustc --explain E0425`.
error: could not compile `rustc_session` (lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
Build completed unsuccessfully in 0:01:13

Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

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

You also need to update the fluent slug that was called session_invalid_character_in_create_name.

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 5, 2025
@compiler-errors
Copy link
Member

Please also ensure this is squashed into one commit

@jieyouxu
Copy link
Member

jieyouxu commented Jan 5, 2025

I'm going to close this PR because it only contains typo fixes and is not worth the churn. We don't want to encourage trivial typo fix PRs because of limited reviewer bandwidth.

@jieyouxu jieyouxu closed this Jan 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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.

5 participants