Skip to content

Conversation

@sergiogiro
Copy link
Contributor

@sergiogiro sergiogiro commented Jan 7, 2026

Fixes #16150 , do not error when importing anonymously using an underscore.

In the issue it is suggested that perhaps there could be a flag to enable/disable this new behavior, but I don't see a strong case for disallowing "as _" when a rename was specified.

Please let me know if you think that flag would be useful and I can implement that on top.

changelog: [`missing_enforced_import_rename`]: do not enforce renaming consistency in the case "import ... as _;"

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Jan 7, 2026
@rustbot
Copy link
Collaborator

rustbot commented Jan 7, 2026

r? @Jarcho

rustbot has assigned @Jarcho.
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

Copy link
Contributor

@Jarcho Jarcho left a comment

Choose a reason for hiding this comment

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

@Jarcho Jarcho added this pull request to the merge queue Jan 8, 2026
Merged via the queue into rust-lang:master with commit 327c558 Jan 8, 2026
11 of 13 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Jan 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Trait in enforced-import-renames should still allow import as _

3 participants