Skip to content

Rewrite use-statement-duplicate-check-7663 test#155612

Open
qaijuang wants to merge 2 commits intorust-lang:mainfrom
qaijuang:rewrite-use-statement-duplicate-check-7663-test
Open

Rewrite use-statement-duplicate-check-7663 test#155612
qaijuang wants to merge 2 commits intorust-lang:mainfrom
qaijuang:rewrite-use-statement-duplicate-check-7663-test

Conversation

@qaijuang
Copy link
Copy Markdown

@qaijuang qaijuang commented Apr 21, 2026

Fixes #140780.

This supersedes the abandoned earlier attempt in #141060, which targeted an older test layout.

The existing use-statement-duplicate-check-7663 test had drifted away from the behavior from #7663 and no longer exercised duplicate import handling at all.

This rewrites the test as a revision-based UI test that covers the three relevant cases:

  • using the same name through two glob imports is ambiguous
  • importing the same name explicitly twice is rejected
  • an explicit import still wins over a glob import

Verification

  • ./x test tests/ui/modules --test-args use-statement-duplicate-check-7663

@rustbot rustbot added 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. labels Apr 21, 2026
@qaijuang qaijuang force-pushed the rewrite-use-statement-duplicate-check-7663-test branch from 8b2867f to f5af5d9 Compare April 21, 2026 19:33
@qaijuang qaijuang force-pushed the rewrite-use-statement-duplicate-check-7663-test branch from f5af5d9 to 3443c7d Compare April 21, 2026 19:47
@qaijuang qaijuang marked this pull request as ready for review April 21, 2026 20:04
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 21, 2026
@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Apr 21, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 21, 2026

r? @mu001999

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

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 72 candidates
  • Random selection from 18 candidates

@rustbot

This comment has been minimized.

@qaijuang qaijuang force-pushed the rewrite-use-statement-duplicate-check-7663-test branch from 18b5006 to 9ea8064 Compare April 21, 2026 20:11
@Kivooeo Kivooeo assigned Kivooeo and unassigned mu001999 Apr 21, 2026
@Kivooeo
Copy link
Copy Markdown
Member

Kivooeo commented Apr 21, 2026

Hi, thanks for you contribution!

Before proceeding with the review, could you briefly describe any use of LLMs for creation of this PR?

Thanks!

@qaijuang
Copy link
Copy Markdown
Author

Yes, for aid with PR description

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. 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.

Test for #7663 doesn't test anything (?)

4 participants