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 | e4bde05ed6e4028e936ac223e0322ff66020ad9f (patch) | |
| tree | 6c8366b245fa30135522b1522fb74ce4fe0341eb | |
| parent | 5adaed06a0326a567ce0571ba1cdbf503f99bf86 (diff) | |
| download | rust-e4bde05ed6e4028e936ac223e0322ff66020ad9f.tar.gz rust-e4bde05ed6e4028e936ac223e0322ff66020ad9f.zip | |
Give Instance::expect_resolve a span
| -rw-r--r-- | src/abi/mod.rs | 11 | ||||
| -rw-r--r-- | src/main_shim.rs | 2 |
2 files changed, 10 insertions, 3 deletions
diff --git a/src/abi/mod.rs b/src/abi/mod.rs index 0d7eee7afb4..81dfde81e93 100644 --- a/src/abi/mod.rs +++ b/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/src/main_shim.rs b/src/main_shim.rs index 33d3f9b8a90..d1dc147dba8 100644 --- a/src/main_shim.rs +++ b/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); |
