Ensure calculcate_dtor is only ever called on local types
This commit is contained in:
@@ -114,11 +114,11 @@ pub fn provide(providers: &mut Providers) {
|
||||
}
|
||||
|
||||
fn adt_destructor(tcx: TyCtxt<'_>, def_id: LocalDefId) -> Option<ty::Destructor> {
|
||||
tcx.calculate_dtor(def_id.to_def_id(), always_applicable::check_drop_impl)
|
||||
tcx.calculate_dtor(def_id, always_applicable::check_drop_impl)
|
||||
}
|
||||
|
||||
fn adt_async_destructor(tcx: TyCtxt<'_>, def_id: LocalDefId) -> Option<ty::AsyncDestructor> {
|
||||
tcx.calculate_async_dtor(def_id.to_def_id(), always_applicable::check_drop_impl)
|
||||
tcx.calculate_async_dtor(def_id, always_applicable::check_drop_impl)
|
||||
}
|
||||
|
||||
/// Given a `DefId` for an opaque type in return position, find its parent item's return
|
||||
|
||||
Reference in New Issue
Block a user