Skip to content

1.98 beta regressions involving ambiguous glob imports #159432

Closed as not planned
Closed as not planned

Description

@theemathas

This regression was found by the 1.98 crater run.

[INFO] [stdout] error[E0659]: `SequenceNumber` is ambiguous
[INFO] [stdout]    --> /opt/rustwide/cargo-home/git/checkouts/ros2-client-a2a0f36ac41415ea/3cab61b/src/service/mod.rs:347:51
[INFO] [stdout]     |
[INFO] [stdout] 347 |       sequence_number_gen: atomic::AtomicI64::new(SequenceNumber::default().into()),
[INFO] [stdout]     |                                                   ^^^^^^^^^^^^^^ ambiguous name
[INFO] [stdout]     |
[INFO] [stdout]     = note: ambiguous because of multiple glob imports of a name in the same module
[INFO] [stdout] note: `SequenceNumber` could refer to the struct imported here
[INFO] [stdout]    --> /opt/rustwide/cargo-home/git/checkouts/ros2-client-a2a0f36ac41415ea/3cab61b/src/service/mod.rs:10:3
[INFO] [stdout]     |
[INFO] [stdout]  10 |   *,
[INFO] [stdout]     |   ^
[INFO] [stdout]     = help: consider adding an explicit import of `SequenceNumber` to disambiguate
[INFO] [stdout] note: `SequenceNumber` could also refer to the struct imported here
[INFO] [stdout]    --> /opt/rustwide/cargo-home/git/checkouts/ros2-client-a2a0f36ac41415ea/3cab61b/src/service/mod.rs:18:9
[INFO] [stdout]     |
[INFO] [stdout]  18 | pub use request_id::*;
[INFO] [stdout]     |         ^^^^^^^^^^^^^
[INFO] [stdout]     = help: consider adding an explicit import of `SequenceNumber` to disambiguate

This error looks like it plausibly could be intentionally caused by #149195. cc @petrochenkov @mu001999

Errors similar to the above error affect 30 crates that were not previously found by the above PR's crater run:

Affected crates

Activity

  1. added
    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.
    E-needs-bisectionCall for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc
    E-needs-mcveCall for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example
    on Jul 17, 2026
  2. added
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    I-prioritizeIssue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}
    on Jul 17, 2026
  3. petrochenkov commented on Jul 17, 2026

    @petrochenkov
    Contributor

    From a cursory look, everything looks like legitimate examples of ambiguous glob imports.
    The lint was reported for several years, most affected crates fixed it, but there's a long tail of outdated versions of the crates stuck in lock files.

  4. theemathas commented on Jul 17, 2026

    @theemathas
    ContributorAuthor

    Some more instances of this from the rustdoc crater run:

    Affected crates
  5. removed
    E-needs-bisectionCall for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc
    E-needs-mcveCall for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Jul 17, 2026
  6. theemathas commented on Jul 25, 2026

    @theemathas
    ContributorAuthor

    My understanding of the state of this is: This is intended breakage. However, I find it a bit worrying that there are many instances of this that were not detected by the previous crater run (used to inform making that breakage) missed a lot of affected crates.

    Should this issue be closed, or should we get FCP from T-lang to affirm the intended breakage first?

  7. apiraino commented on Jul 30, 2026

    @apiraino
    Contributor

    Discussed during T-compiler triage.

    We are ok with these additional crates accepted as breakage but we want to be sure that also t-lang approves this result, since they were unexpected (see previous comment). Or at least why the rustdoc ones (see Guillaume's comment).

    One discriminating factor is whether this breaking change was behind a FCW for enough time. If this is the case, we're fine with this result. By reading this comment in #149195 it seems that it is (or should be the case, IIUC). @mejrs is trying to find out in #159901

    @rustbot label -I-compiler-nominated +I-lang-nominated

  8. added
    I-lang-nominatedNominated for discussion during a lang team meeting.
    and removed
    I-compiler-nominatedNominated for discussion during a compiler team meeting.
    on Jul 30, 2026
  9. mejrs commented on Jul 30, 2026

    @mejrs
    Member

    @mejrs is trying to find out in #159901

    I don't think it is related actually (but someone with more expertise should determine that), the pattern in #159901 has worked and still works unchanged.

    My comment in the triage meeting was more about the fact that this code exists in the compiler

    use rustc_span::Ident;
    
    pub fn foo() {
        use rustc_ast::token::*; // Exports (private) `rustc_span::Ident;` and `rustc_ast::TokenKind::Ident`
        // use Ident
    }

    yet a FCW was not issued in the local crate. So I'm wondering if we are missing more cases where a FCW should be issued.

  10. added
    I-lang-radarItems that are on lang's radar and will need eventual work or consideration.
    P-lang-drag-1Lang team prioritization drag level 1. https://rust-lang.zulipchat.com/#narrow/channel/410516-t-lang
    P-lang-drag-0Lang team prioritization drag level 0.https://rust-lang.zulipchat.com/#narrow/channel/410516-t-lang.
    and removed
    P-lang-drag-1Lang team prioritization drag level 1. https://rust-lang.zulipchat.com/#narrow/channel/410516-t-lang
    on Aug 5, 2026
  11. traviscross commented on Aug 5, 2026

    @traviscross
    Contributor

    We talked about this in the lang meeting with all members present. We're going to accept this breakage.

  12. removed
    I-prioritizeIssue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}
    on Aug 6, 2026
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` specificallyC-bugCategory: This is a bug.I-lang-nominatedNominated for discussion during a lang team meeting.I-lang-radarItems that are on lang's radar and will need eventual work or consideration.P-lang-drag-0Lang team prioritization drag level 0.https://rust-lang.zulipchat.com/#narrow/channel/410516-t-lang.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-langRelevant to the language teamregression-from-stable-to-betaPerformance or correctness regression from stable to beta.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions