]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_trait_selection/traits/error_reporting/mod.rs
Rollup merge of #75485 - RalfJung:pin, r=nagisa
[rust.git] / src / librustc_trait_selection / traits / error_reporting / mod.rs
index 951e0b2202666748ec2590f5c886ef2e16256375..e597843e6ce91105077e73c122b8be13c14b768a 100644 (file)
@@ -568,7 +568,8 @@ fn report_selection_error(
                             self.tcx.sess.source_map().guess_head_span(
                                 self.tcx.hir().span_if_local(closure_def_id).unwrap(),
                             );
-                        let hir_id = self.tcx.hir().as_local_hir_id(closure_def_id.expect_local());
+                        let hir_id =
+                            self.tcx.hir().local_def_id_to_hir_id(closure_def_id.expect_local());
                         let mut err = struct_span_err!(
                             self.tcx.sess,
                             closure_span,
@@ -1100,7 +1101,7 @@ fn error_implies(&self, cond: ty::Predicate<'tcx>, error: ty::Predicate<'tcx>) -
         for obligation in super::elaborate_predicates(self.tcx, std::iter::once(cond)) {
             if let ty::PredicateAtom::Trait(implication, _) = obligation.predicate.skip_binders() {
                 let error = error.to_poly_trait_ref();
-                let implication = ty::Binder::bind(implication).to_poly_trait_ref();
+                let implication = ty::Binder::bind(implication.trait_ref);
                 // FIXME: I'm just not taking associated types at all here.
                 // Eventually I'll need to implement param-env-aware
                 // `Γ₁ ⊦ φ₁ => Γ₂ ⊦ φ₂` logic.