Files
rust/tests/ui/enum/enum-and-module-in-same-scope.rs
Esteban Küber 28fe133026 Do not continue past rustc_resolve when encountering duplicated types
Duplicated items cause lots of confusing knock down errors. This change side-steps some known ICEs, and reduces the verbosity of crates with duplicated types at the cost of not emitting every error that we could.

Update tests that no longer crash:

120873 -> `tests/ui/resolve/multiple_definitions_attribute_merging.rs`
          (already existing)
123690 -> `tests/ui/resolve/duplicated-enum-variant.rs`
155482 -> `tests/ui/resolve/duplicated-item-in-const-generics.rs`
	  Added two cases from the report that still ICE.
2026-09-20 22:06:40 +00:00

11 lines
203 B
Rust

enum Foo {
X
}
mod Foo { //~ ERROR the name `Foo` is defined multiple times
pub static X: isize = 42;
fn f() { f() } // Check that this does not result in a resolution error
}
fn main() {}