Skip to content

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

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

Open
pvdrz opened this issue May 8, 2025 · 2 comments · May be fixed by #141060
Open

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

pvdrz opened this issue May 8, 2025 · 2 comments · May be fixed by #141060
Labels
A-resolve Area: Name/path resolution done by `rustc_resolve` specifically A-testsuite Area: The testsuite used to check the correctness of rustc C-bug Category: This is a bug. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@pvdrz
Copy link
Contributor

pvdrz commented May 8, 2025

This is a similar story to #140765. Basically tests/ui/issues/issue-7663.rs doesn't test anything as the glob imports were removed from the file and there's no duplicated import for p on either case.

I think the test should no longer be run-pass and instead it should test that:

  • Importing both p items with glob imports fails
  • Importing both p items with non-glob imports fails
  • Importing one p with a glob import and another p with a non-glob import is ok.

I'll create a PR with a fix if this is correct.

Thanks!

@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label May 8, 2025
@jieyouxu
Copy link
Member

Yes, that test is not checking what it was originally checking. Try to see if existing tests in tests/ui/resolve/ covers those cases already.

@jieyouxu jieyouxu added A-testsuite Area: The testsuite used to check the correctness of rustc A-resolve Area: Name/path resolution done by `rustc_resolve` specifically T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. C-bug Category: This is a bug. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels May 14, 2025
@pvdrz
Copy link
Contributor Author

pvdrz commented May 15, 2025

The third case is covered by tests/ui/resolve/hidden_glob_reexports.rs but I couldn't find any test that covers the other two. I'm moving issue-7663.rs to tests/ui/resolve and repurposing to test the first two cases.

@pvdrz pvdrz linked a pull request May 15, 2025 that will close this issue
pvdrz added a commit to pvdrz/rust that referenced this issue May 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-resolve Area: Name/path resolution done by `rustc_resolve` specifically A-testsuite Area: The testsuite used to check the correctness of rustc C-bug Category: This is a bug. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants