]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_trait_selection/src/traits/codegen.rs
Auto merge of #105415 - nikic:update-llvm-10, r=cuviper
[rust.git] / compiler / rustc_trait_selection / src / traits / codegen.rs
index ca4299f7db394abb8df48cb1d075b36ca0199de1..0102d268b42e18b51e558247d042f9120092fabd 100644 (file)
@@ -39,8 +39,7 @@ pub fn codegen_select_candidate<'tcx>(
     let mut selcx = SelectionContext::new(&infcx);
 
     let obligation_cause = ObligationCause::dummy();
-    let obligation =
-        Obligation::new(tcx, obligation_cause, param_env, trait_ref.to_poly_trait_predicate());
+    let obligation = Obligation::new(tcx, obligation_cause, param_env, trait_ref);
 
     let selection = match selcx.select(&obligation) {
         Ok(Some(selection)) => selection,
@@ -71,7 +70,7 @@ pub fn codegen_select_candidate<'tcx>(
         // `rustc_ty_utils::resolve_associated_item` doesn't return `None` post-monomorphization.
         for err in errors {
             if let FulfillmentErrorCode::CodeCycle(cycle) = err.code {
-                infcx.err_ctxt().report_overflow_error_cycle(&cycle);
+                infcx.err_ctxt().report_overflow_obligation_cycle(&cycle);
             }
         }
         return Err(CodegenObligationError::FulfillmentError);