Skip to content

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

@pvdrz

Description

@pvdrz
Contributor

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!

Activity

added
needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.
on May 8, 2025
jieyouxu

jieyouxu commented on May 14, 2025

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

added
A-testsuiteArea: The testsuite used to check the correctness of rustc
A-resolveArea: Name/path resolution done by `rustc_resolve` specifically
T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
C-bugCategory: This is a bug.
and removed
needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.
on May 14, 2025
pvdrz

pvdrz commented on May 15, 2025

@pvdrz
ContributorAuthor

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.

linked a pull request that will close this issue on May 15, 2025
added a commit that references this issue on May 15, 2025
57d2254
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-resolveArea: Name/path resolution done by `rustc_resolve` specificallyA-testsuiteArea: The testsuite used to check the correctness of rustcC-bugCategory: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @pvdrz@jieyouxu@rustbot

      Issue actions

        Test for #7663 doesn't test anything (?) · Issue #140780 · rust-lang/rust