]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_typeck/check/mod.rs
directly contain `PredicateAtom` in `PredicateKind::ForAll`
[rust.git] / src / librustc_typeck / check / mod.rs
index 61520e292365037c98038db79828a1c4026c8da4..6cefc99f7b1718a46a94158022c66a60e95fac7d 100644 (file)
@@ -2939,9 +2939,7 @@ fn get_type_parameter_bounds(&self, _: Span, def_id: DefId) -> ty::GenericPredic
             predicates: tcx.arena.alloc_from_iter(
                 self.param_env.caller_bounds().iter().filter_map(|predicate| {
                     match predicate.skip_binders() {
-                        ty::PredicateAtom::Trait(data, _)
-                            if data.self_ty().is_param(index) =>
-                        {
+                        ty::PredicateAtom::Trait(data, _) if data.self_ty().is_param(index) => {
                             // HACK(eddyb) should get the original `Span`.
                             let span = tcx.def_span(def_id);
                             Some((predicate, span))
@@ -5373,7 +5371,6 @@ fn suggest_missing_await(
                     projection_ty,
                     ty: expected,
                 })
-                .to_predicate(self.tcx)
                 .potentially_quantified(self.tcx, ty::PredicateKind::ForAll);
                 let obligation = traits::Obligation::new(self.misc(sp), self.param_env, predicate);