diff options
| author | lcnr <rust@lcnr.de> | 2024-11-15 13:53:31 +0100 |
|---|---|---|
| committer | lcnr <rust@lcnr.de> | 2024-11-18 10:38:56 +0100 |
| commit | 9cba14b95bb07a5b31ed1aac2bf4eadd248232da (patch) | |
| tree | 60791c9abdfdc19133ab67c41a6d2872dfce745b /compiler/rustc_const_eval/src/interpret/step.rs | |
| parent | bf6adec108e83c5ddfcbb443a9177203db5eb945 (diff) | |
| download | rust-9cba14b95bb07a5b31ed1aac2bf4eadd248232da.tar.gz rust-9cba14b95bb07a5b31ed1aac2bf4eadd248232da.zip | |
use `TypingEnv` when no `infcx` is available
the behavior of the type system not only depends on the current assumptions, but also the currentnphase of the compiler. This is mostly necessary as we need to decide whether and how to reveal opaque types. We track this via the `TypingMode`.
Diffstat (limited to 'compiler/rustc_const_eval/src/interpret/step.rs')
| -rw-r--r-- | compiler/rustc_const_eval/src/interpret/step.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/step.rs b/compiler/rustc_const_eval/src/interpret/step.rs index 18cff2c5e0f..d4525243642 100644 --- a/compiler/rustc_const_eval/src/interpret/step.rs +++ b/compiler/rustc_const_eval/src/interpret/step.rs @@ -418,7 +418,8 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> { .collect::<InterpResult<'tcx, Vec<_>>>()?; let fn_sig_binder = func.layout.ty.fn_sig(*self.tcx); - let fn_sig = self.tcx.normalize_erasing_late_bound_regions(self.param_env, fn_sig_binder); + let fn_sig = + self.tcx.normalize_erasing_late_bound_regions(self.typing_env(), fn_sig_binder); let extra_args = &args[fn_sig.inputs().len()..]; let extra_args = self.tcx.mk_type_list_from_iter(extra_args.iter().map(|arg| arg.layout().ty)); |
