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,
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.