diff options
| author | Michael Goulet <michael@errs.io> | 2023-07-04 01:18:31 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2023-07-06 16:50:12 +0000 |
| commit | 3f8919c09bbf78b6d1d48fbbacbd63ad5a78cf7a (patch) | |
| tree | 2e4bf24b0c2cf8f07ca01de73f901358015b3cd9 /compiler/rustc_traits/src/codegen.rs | |
| parent | 018c3e2c092d73d18169729c4dde92c29924d9d8 (diff) | |
| download | rust-3f8919c09bbf78b6d1d48fbbacbd63ad5a78cf7a.tar.gz rust-3f8919c09bbf78b6d1d48fbbacbd63ad5a78cf7a.zip | |
get rid of a bit more calls to poly_select
Diffstat (limited to 'compiler/rustc_traits/src/codegen.rs')
| -rw-r--r-- | compiler/rustc_traits/src/codegen.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_traits/src/codegen.rs b/compiler/rustc_traits/src/codegen.rs index aba453e4a1d..2cd1c3b502a 100644 --- a/compiler/rustc_traits/src/codegen.rs +++ b/compiler/rustc_traits/src/codegen.rs @@ -22,7 +22,7 @@ use rustc_trait_selection::traits::{ /// This also expects that `trait_ref` is fully normalized. pub fn codegen_select_candidate<'tcx>( tcx: TyCtxt<'tcx>, - (param_env, trait_ref): (ty::ParamEnv<'tcx>, ty::PolyTraitRef<'tcx>), + (param_env, trait_ref): (ty::ParamEnv<'tcx>, ty::TraitRef<'tcx>), ) -> Result<&'tcx ImplSource<'tcx, ()>, CodegenObligationError> { // We expect the input to be fully normalized. debug_assert_eq!(trait_ref, tcx.normalize_erasing_regions(param_env, trait_ref)); @@ -35,7 +35,7 @@ pub fn codegen_select_candidate<'tcx>( let obligation_cause = ObligationCause::dummy(); let obligation = Obligation::new(tcx, obligation_cause, param_env, trait_ref); - let selection = match selcx.poly_select(&obligation) { + let selection = match selcx.select(&obligation) { Ok(Some(selection)) => selection, Ok(None) => return Err(CodegenObligationError::Ambiguity), Err(Unimplemented) => return Err(CodegenObligationError::Unimplemented), |
