mirror of
https://github.com/allankoechke/rust.git
synced 2026-12-01 17:40:16 +00:00
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.
11 lines
203 B
Rust
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() {}
|