1
Fork 0

Use associated_item_def_ids more

This commit is contained in:
Matthew Jasper 2021-11-05 18:47:52 +00:00
parent 3ea84e879a
commit ba518ffdd3
7 changed files with 16 additions and 34 deletions

View file

@ -1704,13 +1704,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
if let ty::Opaque(def_id, substs) = ty.kind() {
let future_trait = self.tcx.require_lang_item(LangItem::Future, None);
// Future::Output
let item_def_id = self
.tcx
.associated_items(future_trait)
.in_definition_order()
.next()
.unwrap()
.def_id;
let item_def_id = self.tcx.associated_item_def_ids(future_trait)[0];
let bounds = self.tcx.explicit_item_bounds(*def_id);