Remove unused adt-def insertion by constructor DefIndex by cramertj · Pull Request #40696 · rust-lang/rust (original) (raw)
It looks to me like ADT definitions weren't being looked up by constructor id, and a test run supports my theory.
In any case, I'm not sure it would have worked in its current configuration. If I understand correctly, the adt_def
map entry from constructor id -> adt def would only be present after a successful call to queries::adt_def::get
with the proper ADT DefIndex
. Trying to look up an adt_def by the constructor index prior to a successful lookup by ADT index would fail since item.kind
would be EntryKind::Fn
(for the constructor function) and so would trigger the bug!
.