Skip to content

1.98 beta regressions involving ambiguous glob imports #159432

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

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-prioritizeIssue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}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