-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-resolveArea: Name/path resolution done by `rustc_resolve` specificallyArea: Name/path resolution done by `rustc_resolve` specificallyC-bugCategory: This is a bug.Category: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
I tried this code:
a.rs:
pub use a::*;
mod a {
pub use a::*;
pub use b::*;
mod a {
pub fn f() {}
}
mod b {
pub fn f() {}
}
}
b.rs:
pub fn main() {
a::f();
}
rustc a.rs --edition=2018 --crate-type=lib
rustc b.rs --edition=2018 --crate-type=lib -L. --extern a
I expected it to fail with an ambiguity error, instead it ICEs.
The code compiles successfully in 1.72.
Since #113099 it generates an ICE (it seems that now when an ambiguity is detected, the processing is not fully finalized and effective visibilities and reachability is incomplete).
Reporting primarily due to the fact that the future incompatibility for ambiguous glob imports is not enabled by default for dependencies #114095 (comment), which hides the root cause of the issue.
Error output
error: internal compiler error: compiler/rustc_monomorphize/src/collector.rs:963:9: no MIR available for DefId(20:8 ~ a[024e]::a::a::f)
Metadata
Metadata
Assignees
Labels
A-resolveArea: Name/path resolution done by `rustc_resolve` specificallyArea: Name/path resolution done by `rustc_resolve` specificallyC-bugCategory: This is a bug.Category: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.