]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_hir_analysis/src/hir_wf_check.rs
Auto merge of #104845 - matthiaskrgr:rollup-tckj956, r=matthiaskrgr
[rust.git] / compiler / rustc_hir_analysis / src / hir_wf_check.rs
index b0fdfcf38a6083d74c063dfaa16cc61c105d59f3..4f9d5826583c303875f609dbf62a4462024c53d6 100644 (file)
@@ -5,7 +5,7 @@
 use rustc_infer::infer::TyCtxtInferExt;
 use rustc_infer::traits::{ObligationCause, WellFormedLoc};
 use rustc_middle::ty::query::Providers;
-use rustc_middle::ty::{self, Region, ToPredicate, TyCtxt, TypeFoldable, TypeFolder};
+use rustc_middle::ty::{self, Region, TyCtxt, TypeFoldable, TypeFolder};
 use rustc_trait_selection::traits;
 
 pub fn provide(providers: &mut Providers) {
@@ -74,10 +74,10 @@ fn visit_ty(&mut self, ty: &'tcx hir::Ty<'tcx>) {
             let errors = traits::fully_solve_obligation(
                 &infcx,
                 traits::Obligation::new(
+                    self.tcx,
                     cause,
                     self.param_env,
-                    ty::Binder::dummy(ty::PredicateKind::WellFormed(tcx_ty.into()))
-                        .to_predicate(self.tcx),
+                    ty::Binder::dummy(ty::PredicateKind::WellFormed(tcx_ty.into())),
                 ),
             );
             if !errors.is_empty() {