@@ -223,12 +223,16 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
223
223
let ( dest, ret) = match ret {
224
224
None => match link_name {
225
225
"miri_start_panic" => {
226
+ // `check_shim` happens inside `handle_miri_start_panic`.
226
227
this. handle_miri_start_panic ( abi, link_name_sym, args, unwind) ?;
227
228
return Ok ( None ) ;
228
229
}
229
230
// This matches calls to the foreign item `panic_impl`.
230
231
// The implementation is provided by the function with the `#[panic_handler]` attribute.
231
232
"panic_impl" => {
233
+ // We don't use `check_shim` here because we are just forwarding to the lang
234
+ // item. Argument count checking will be performed when the returned `Body` is
235
+ // called.
232
236
this. check_abi_and_shim_symbol_clash ( abi, Abi :: Rust , link_name_sym) ?;
233
237
let panic_impl_id = tcx. lang_items ( ) . panic_impl ( ) . unwrap ( ) ;
234
238
let panic_impl_instance = ty:: Instance :: mono ( tcx, panic_impl_id) ;
@@ -317,11 +321,13 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
317
321
318
322
// Obtains a Miri backtrace. See the README for details.
319
323
"miri_get_backtrace" => {
324
+ // `check_shim` happens inside `handle_miri_get_backtrace`.
320
325
this. handle_miri_get_backtrace ( abi, link_name_sym, args, dest) ?;
321
326
}
322
327
323
328
// Resolves a Miri backtrace frame. See the README for details.
324
329
"miri_resolve_frame" => {
330
+ // `check_shim` happens inside `handle_miri_resolve_frame`.
325
331
this. handle_miri_resolve_frame ( abi, link_name_sym, args, dest) ?;
326
332
}
327
333
0 commit comments