Skip to content

regression: error[E0659]: Entry is ambiguous #134714

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

Closed
cuviper opened this issue Dec 24, 2024 · 2 comments
Closed

regression: error[E0659]: Entry is ambiguous #134714

cuviper opened this issue Dec 24, 2024 · 2 comments
Labels
C-bug Category: This is a bug. regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Milestone

Comments

@cuviper
Copy link
Member

cuviper commented Dec 24, 2024

[INFO] [stdout] error[E0659]: `Entry` is ambiguous
[INFO] [stdout]   --> src/component_index.rs:28:13
[INFO] [stdout]    |
[INFO] [stdout] 28 |             Entry::Occupied(o) => o.into_mut(),
[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: `Entry` could refer to the enum imported here
[INFO] [stdout]   --> src/component_index.rs:6:5
[INFO] [stdout]    |
[INFO] [stdout] 6  | use std::collections::hash_map::*;
[INFO] [stdout]    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]    = help: consider adding an explicit import of `Entry` to disambiguate
[INFO] [stdout] note: `Entry` could also refer to the enum imported here
[INFO] [stdout]   --> src/component_index.rs:7:5
[INFO] [stdout]    |
[INFO] [stdout] 7  | use std::collections::hash_set::*;
[INFO] [stdout]    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]    = help: consider adding an explicit import of `Entry` to disambiguate
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0659]: `Entry` is ambiguous
[INFO] [stdout]   --> src/component_index.rs:29:13
[INFO] [stdout]    |
[INFO] [stdout] 29 |             Entry::Vacant(v) => v.insert(HashSet::new()),
[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: `Entry` could refer to the enum imported here
[INFO] [stdout]   --> src/component_index.rs:6:5
[INFO] [stdout]    |
[INFO] [stdout] 6  | use std::collections::hash_map::*;
[INFO] [stdout]    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]    = help: consider adding an explicit import of `Entry` to disambiguate
[INFO] [stdout] note: `Entry` could also refer to the enum imported here
[INFO] [stdout]   --> src/component_index.rs:7:5
[INFO] [stdout]    |
[INFO] [stdout] 7  | use std::collections::hash_set::*;
[INFO] [stdout]    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]    = help: consider adding an explicit import of `Entry` to disambiguate
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] For more information about this error, try `rustc --explain E0659`.
[INFO] [stdout] 
[INFO] [stderr] error: could not document `beverage`

Version it worked on

It most recently worked on: 1.83.0

Version with regression

Using rustc 1.84.0-beta.4 in crater #134138.

@rustbot modify labels: +regression-from-stable-to-beta -regression-untriaged

@cuviper cuviper added C-bug Category: This is a bug. regression-untriaged Untriaged performance or correctness regression. labels Dec 24, 2024
@cuviper cuviper added this to the 1.84.0 milestone Dec 24, 2024
@rustbot rustbot added I-prioritize Issue: Indicates that prioritization has been requested for this issue. needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. regression-from-stable-to-beta Performance or correctness regression from stable to beta. and removed regression-untriaged Untriaged performance or correctness regression. labels Dec 24, 2024
@cuviper
Copy link
Member Author

cuviper commented Dec 24, 2024

This is kinda similar to #134707, in that it's cause by glob imports and a new unstable API.
(i.e. hash_map::Entry is long stable, but hash_set::Entry is new)

@jieyouxu jieyouxu added the T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. label Dec 24, 2024
@Amanieu
Copy link
Member

Amanieu commented Jan 7, 2025

We discussed this in the libs-api meeting today. As there is only one broken crate and it isn't published on crates.io we consider this to be acceptable breakage.

@Amanieu Amanieu closed this as completed Jan 7, 2025
@jieyouxu jieyouxu removed I-prioritize Issue: Indicates that prioritization has been requested for this issue. needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants