Rename some name variables as ident.#139510
Merged
bors merged 2 commits intorust-lang:masterfrom Apr 10, 2025
Merged
Conversation
Collaborator
fee1-dead
requested changes
Apr 9, 2025
Member
fee1-dead
left a comment
There was a problem hiding this comment.
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.
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.
0010636 to
663a317
Compare
Contributor
Author
|
Thanks for the review. I added a new commit addressing the comments. |
Member
|
Thanks! Next time please use @bors r+ rollup |
Collaborator
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
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`
BD103
added a commit
to TheBevyFlock/bevy_cli
that referenced
this pull request
Jun 26, 2025
The method got renamed, it took me _way_ too long to figure that out. I ended up removing it entirely in `borrowed_reborrowable` since we already have access to the argument names through the function body. (This was before I realized `fn_arg_names()` wasn't just outright deleted.) rust-lang/rust#139510
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It bugs me when variables of type
Identare calledname. It leads to silly things likename.name.Identvariables should be calledident, andnameshould be used for variables of typeSymbol.This commit improves things by by doing
s/name/ident/on a bunch ofIdentvariables. Not all of them, but a decent chunk.r? @fee1-dead