Skip to content

Avoid some uses of empty identifiers #14580

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 11, 2025

Conversation

nnethercote
Copy link
Contributor

@nnethercote nnethercote commented Apr 10, 2025

This contributes towards rust-lang/rust#137978.

changelog: none

`Option<Symbol>` is a much nicer and idiomatic way of representing "no
name" using empty symbols. And it works naturally for the item ordering
checking because `None < Some(_)` just like the empty string compares
less than all non-empty strings.

changelog: none
By moving a couple of identifier checks earlier, we no longer need to
use an empty identifier for the `impl` case.

changelog: none
@rustbot
Copy link
Collaborator

rustbot commented Apr 10, 2025

r? @Manishearth

rustbot has assigned @Manishearth.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Apr 10, 2025
@samueltardieu
Copy link
Contributor

I'll handle both #14585 and #14580.
r? @samueltardieu

Copy link
Contributor

@samueltardieu samueltardieu left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@samueltardieu samueltardieu added this pull request to the merge queue Apr 11, 2025
Merged via the queue into rust-lang:master with commit 0cd5b62 Apr 11, 2025
13 checks passed
@nnethercote nnethercote deleted the less-kw-Empty branch April 11, 2025 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants