Use associated_item_def_ids more
This commit is contained in:
@@ -325,9 +325,9 @@ impl<'tcx> TyCtxt<'tcx> {
|
||||
|
||||
let ty = self.type_of(adt_did);
|
||||
let (did, constness) = self.find_map_relevant_impl(drop_trait, ty, |impl_did| {
|
||||
if let Some(item) = self.associated_items(impl_did).in_definition_order().next() {
|
||||
if let Some(item_id) = self.associated_item_def_ids(impl_did).first() {
|
||||
if validate(self, impl_did).is_ok() {
|
||||
return Some((item.def_id, self.impl_constness(impl_did)));
|
||||
return Some((*item_id, self.impl_constness(impl_did)));
|
||||
}
|
||||
}
|
||||
None
|
||||
|
||||
Reference in New Issue
Block a user