diff options
| author | lcnr <rust@lcnr.de> | 2024-10-18 00:28:43 +0200 |
|---|---|---|
| committer | lcnr <rust@lcnr.de> | 2024-10-29 17:01:24 +0100 |
| commit | f51ec110a714fea09105586b26c7f8e6a2a57018 (patch) | |
| tree | 29a95667fbca16fc3bd6e6f5c3bb80bef722b657 /compiler/rustc_traits/src/codegen.rs | |
| parent | 2dece5bb62f234f5622a08289c5a3d1555cd7843 (diff) | |
| download | rust-f51ec110a714fea09105586b26c7f8e6a2a57018.tar.gz rust-f51ec110a714fea09105586b26c7f8e6a2a57018.zip | |
TypingMode :thinking:
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 11182198246..d8c1c50d79a 100644 --- a/compiler/rustc_traits/src/codegen.rs +++ b/compiler/rustc_traits/src/codegen.rs @@ -6,7 +6,7 @@ use rustc_infer::infer::TyCtxtInferExt; use rustc_middle::bug; use rustc_middle::traits::CodegenObligationError; -use rustc_middle::ty::{self, TyCtxt, TypeVisitableExt}; +use rustc_middle::ty::{self, TyCtxt, TypeVisitableExt, TypingMode}; use rustc_trait_selection::error_reporting::InferCtxtErrorExt; use rustc_trait_selection::traits::{ ImplSource, Obligation, ObligationCause, ObligationCtxt, ScrubbedTraitError, SelectionContext, @@ -30,7 +30,7 @@ pub(crate) fn codegen_select_candidate<'tcx>( // Do the initial selection for the obligation. This yields the // shallow result we are looking for -- that is, what specific impl. - let infcx = tcx.infer_ctxt().ignoring_regions().build(); + let infcx = tcx.infer_ctxt().ignoring_regions().build(TypingMode::from_param_env(param_env)); let mut selcx = SelectionContext::new(&infcx); let obligation_cause = ObligationCause::dummy(); |
