rust/compiler/rustc_ty_utils
bors 85c0558d03 Auto merge of #90218 - JakobDegen:adt_significant_drop_fix, r=nikomatsakis
Fixes incorrect handling of ADT's drop requirements

Fixes #90024 and a bunch of duplicates.

The main issue was just that the contract of `NeedsDropTypes::adt_components` was inconsistent; the list of types it might return were the generic parameters themselves or the fields of the ADT, depending on the nature of the drop impl. This meant that the caller could not determine whether a `.subst()` call was still needed on those types; it called `.subst()` in all cases, and this led to ICEs when the returned types were the generic params.

First contribution of more than a few lines, so feedback definitely appreciated.
2021-10-28 16:03:13 +00:00
..
src Auto merge of #90218 - JakobDegen:adt_significant_drop_fix, r=nikomatsakis 2021-10-28 16:03:13 +00:00
Cargo.toml Migrate to 2021 2021-09-20 22:21:42 -04:00