Skip to content

Rename some name variables as ident. #139510

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
Apr 10, 2025
Merged

Conversation

nnethercote
Copy link
Contributor

It bugs me when variables of type Ident are called name. It leads to silly things like name.name. Ident variables should be called ident, and name should be used for variables of type Symbol.

This commit improves things by by doing s/name/ident/ on a bunch of Ident variables. Not all of them, but a decent chunk.

r? @fee1-dead

@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 Apr 8, 2025
@rustbot
Copy link
Collaborator

rustbot commented Apr 8, 2025

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

HIR ty lowering was modified

cc @fmease

Some changes occurred in compiler/rustc_codegen_cranelift

cc @bjorn3

@rustbot rustbot added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Apr 8, 2025
Copy link
Member

@fee1-dead fee1-dead left a comment

Choose a reason for hiding this comment

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

Had a nitpick here. I think it should be fine to name types/functions/variables using the abbreviated form ident, but when referring to them in comments it would probably be better to call them by what they actually are: identifiers.

@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 Apr 9, 2025
It bugs me when variables of type `Ident` are called `name`. It leads to
silly things like `name.name`. `Ident` variables should be called
`ident`, and `name` should be used for variables of type `Symbol`.

This commit improves things by by doing `s/name/ident/` on a bunch of
`Ident` variables. Not all of them, but a decent chunk.
@nnethercote
Copy link
Contributor Author

Thanks for the review. I added a new commit addressing the comments.

@fee1-dead
Copy link
Member

Thanks! Next time please use @rustbot ready or edit the labels so it gets better visibility.

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Apr 10, 2025

📌 Commit 663a317 has been approved by fee1-dead

It is now in the queue for this repository.

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 10, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 10, 2025
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#139502 (fix "still mutable" ice while metrics are enabled)
 - rust-lang#139510 (Rename some `name` variables as `ident`.)
 - rust-lang#139606 (Update compiletest to Edition 2024)
 - rust-lang#139609 (compiletest: don't use stringly paths for `compose_and_run`)
 - rust-lang#139614 (Avoid empty identifiers for delegate params and args.)
 - rust-lang#139626 (Remove unnecessary `mut` in test.)
 - rust-lang#139630 (Miri subtree update)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 79f357e into rust-lang:master Apr 10, 2025
6 checks passed
@rustbot rustbot added this to the 1.88.0 milestone Apr 10, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Apr 10, 2025
Rollup merge of rust-lang#139510 - nnethercote:name-to-ident, r=fee1-dead

Rename some `name` variables as `ident`.

It bugs me when variables of type `Ident` are called `name`. It leads to silly things like `name.name`. `Ident` variables should be called `ident`, and `name` should be used for variables of type `Symbol`.

This commit improves things by by doing `s/name/ident/` on a bunch of `Ident` variables. Not all of them, but a decent chunk.

r? `@fee1-dead`
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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants