diff options
| author | Michael Goulet <michael@errs.io> | 2024-06-12 13:06:23 -0400 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-07-02 15:48:48 -0400 |
| commit | 9dc129ae829f8f322421dc9fb2c64d58e11eb08a (patch) | |
| tree | cd29c098d1a143a3a9b4b8ff255e86c6718dd3fe /compiler/rustc_codegen_cranelift/src | |
| parent | d3a742bde999add41c002513fccd0949859128f4 (diff) | |
| download | rust-9dc129ae829f8f322421dc9fb2c64d58e11eb08a.tar.gz rust-9dc129ae829f8f322421dc9fb2c64d58e11eb08a.zip | |
Give Instance::expect_resolve a span
Diffstat (limited to 'compiler/rustc_codegen_cranelift/src')
| -rw-r--r-- | compiler/rustc_codegen_cranelift/src/abi/mod.rs | 11 | ||||
| -rw-r--r-- | compiler/rustc_codegen_cranelift/src/main_shim.rs | 2 |
2 files changed, 10 insertions, 3 deletions
diff --git a/compiler/rustc_codegen_cranelift/src/abi/mod.rs b/compiler/rustc_codegen_cranelift/src/abi/mod.rs index 0d7eee7afb4..81dfde81e93 100644 --- a/compiler/rustc_codegen_cranelift/src/abi/mod.rs +++ b/compiler/rustc_codegen_cranelift/src/abi/mod.rs @@ -371,9 +371,14 @@ pub(crate) fn codegen_terminator_call<'tcx>( // Handle special calls like intrinsics and empty drop glue. let instance = if let ty::FnDef(def_id, fn_args) = *func.layout().ty.kind() { - let instance = - ty::Instance::expect_resolve(fx.tcx, ty::ParamEnv::reveal_all(), def_id, fn_args) - .polymorphize(fx.tcx); + let instance = ty::Instance::expect_resolve( + fx.tcx, + ty::ParamEnv::reveal_all(), + def_id, + fn_args, + Some(source_info.span), + ) + .polymorphize(fx.tcx); if is_call_from_compiler_builtins_to_upstream_monomorphization(fx.tcx, instance) { if target.is_some() { diff --git a/compiler/rustc_codegen_cranelift/src/main_shim.rs b/compiler/rustc_codegen_cranelift/src/main_shim.rs index 33d3f9b8a90..d1dc147dba8 100644 --- a/compiler/rustc_codegen_cranelift/src/main_shim.rs +++ b/compiler/rustc_codegen_cranelift/src/main_shim.rs @@ -119,6 +119,7 @@ pub(crate) fn maybe_create_entry_wrapper( ParamEnv::reveal_all(), report.def_id, tcx.mk_args(&[GenericArg::from(main_ret_ty)]), + None, ) .polymorphize(tcx); @@ -144,6 +145,7 @@ pub(crate) fn maybe_create_entry_wrapper( ParamEnv::reveal_all(), start_def_id, tcx.mk_args(&[main_ret_ty.into()]), + None, ) .polymorphize(tcx); let start_func_id = import_function(tcx, m, start_instance); |
