From f3fa720352c992c3bd7b3c6fb21aac514943db8d Mon Sep 17 00:00:00 2001 From: geetanshjuneja Date: Sat, 15 Feb 2025 09:37:01 +0530 Subject: [PATCH 1/2] made check_argument_compat public --- compiler/rustc_const_eval/src/interpret/call.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/rustc_const_eval/src/interpret/call.rs b/compiler/rustc_const_eval/src/interpret/call.rs index cdf706f3752a4..995cec4114597 100644 --- a/compiler/rustc_const_eval/src/interpret/call.rs +++ b/compiler/rustc_const_eval/src/interpret/call.rs @@ -241,7 +241,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> { interp_ok(caller == callee) } - fn check_argument_compat( + pub fn check_argument_compat( &self, caller_abi: &ArgAbi<'tcx, Ty<'tcx>>, callee_abi: &ArgAbi<'tcx, Ty<'tcx>>, From 8769d03caf689f89e778f95f5458a5b69be6258d Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sat, 15 Feb 2025 08:21:27 +0100 Subject: [PATCH 2/2] add a doc comment --- compiler/rustc_const_eval/src/interpret/call.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/compiler/rustc_const_eval/src/interpret/call.rs b/compiler/rustc_const_eval/src/interpret/call.rs index 995cec4114597..29f819cca1fb6 100644 --- a/compiler/rustc_const_eval/src/interpret/call.rs +++ b/compiler/rustc_const_eval/src/interpret/call.rs @@ -241,6 +241,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> { interp_ok(caller == callee) } + /// Returns a `bool` saying whether the two arguments are ABI-compatible. pub fn check_argument_compat( &self, caller_abi: &ArgAbi<'tcx, Ty<'tcx>>,