Closed
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)