]> git.lizzy.rs Git - rust.git/commit - src/tools/rust-analyzer
Auto merge of #90218 - JakobDegen:adt_significant_drop_fix, r=nikomatsakis
authorbors <bors@rust-lang.org>
Thu, 28 Oct 2021 16:03:13 +0000 (16:03 +0000)
committerbors <bors@rust-lang.org>
Thu, 28 Oct 2021 16:03:13 +0000 (16:03 +0000)
commit85c0558d032e204f4f4ed6137f3119cb92dbc684
tree3127518a8c43fba07d795570a44569b84f90bb8f
parentc4ff03f689c03d73d3a8af49611b1f2b54d6a300
parentaff37f8f7b0a14493e17bc9fd7844f4392d08241
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.