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

@ -2471,13 +2471,7 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> {
obligation.param_env,
);
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];
// `<T as Future>::Output`
let projection_ty = ty::ProjectionTy {
// `T`