Conversation
This comment has been minimized.
This comment has been minimized.
|
This PR changes a file inside |
d1afad9 to
fb93a90
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
fb93a90 to
9cc7001
Compare
Duplicated items cause lots of confusing knock down errors. This change side-steps some known ICEs, and reduces the verbosity of crates with duplicated items at the cost of not emitting every error that we could.
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.
9cc7001 to
dd5e174
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
This comment has been minimized.
This comment has been minimized.
|
CC @oli-obk as we spent a lot of time some years back removing |
This comment has been minimized.
This comment has been minimized.
| // Duplicated types wreak havoc on other errors, like impls selecting the wrong | ||
| // type causing wrong number of generic params and other assorted number of | ||
| // irrelevant nonsense, so avoid advancing to the next compiler stage. | ||
| self.raise_fatal_after_resolve = true; |
There was a problem hiding this comment.
Why is the flag set conditionally, depending on whether the old or new declaration is an import or not?
I'd expect no such condition, anything that can be defined can be imported as well.
Or if the problem is with types specifically, the condition could be ns == TypeNS or more specific based on old_binding.res().
There was a problem hiding this comment.
Changed. We silence fewer errors now by checking ns == TypeNS. The only knock down error in the suite that I'd like to get rid off caused by dupes is "missing method in impl" caused when the impl has a single method but the trait has two with the same name, but that is minor.
This comment has been minimized.
This comment has been minimized.
|
☔ The latest upstream changes (presumably #163002) made this pull request unmergeable. Please resolve the merge conflicts by rebasing. |
Duplicated items cause lots of confusing knock down errors. This change side-steps some known ICEs, and reduces the verbosity of crates with duplicated items at the cost of not emitting every error that we could.
Noticed just how problematic these can be while looking at #160695, as
#[derive]s are particularly prone to the kind of confusion these duplicates cause.Fix #120873, fix #123690.
r? @petrochenkov