mirror of
https://github.com/allankoechke/rust.git
synced 2026-12-05 01:24:03 +00:00
Resolver: Record at least 1 ambiguous trait if main decl is not a trait. Addresses rust-lang/rust#159476. When recording traits of a particular module, it is possible that a trait hidden in the ambiguity declaration of a main declaration (struct, enum, ...), thus causing us to never record that trait. This caused us to report an error that methods of those traits are not in scope and that we do not report the `AMBIGUOUSLY_GLOB_IMPORTED_TRAIT` lint, which was the case in rust-lang/rust#159476. We now record at least 1 trait in the collection of ambiguous declarations, such that we don't report that error and can report the relevant lint. Also updated the linked issue of the lint in question. r? @petrochenkov