File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -2507,17 +2507,21 @@ where
25072507 let extra_args = if sig. abi == RustCall {
25082508 assert ! ( !sig. c_variadic && extra_args. is_empty( ) ) ;
25092509
2510- match sig. inputs ( ) . last ( ) . unwrap ( ) . kind {
2511- ty:: Tuple ( tupled_arguments) => {
2510+ if let Some ( input ) = sig. inputs ( ) . last ( ) {
2511+ if let ty:: Tuple ( tupled_arguments) = input . kind {
25122512 inputs = & sig. inputs ( ) [ 0 ..sig. inputs ( ) . len ( ) - 1 ] ;
25132513 tupled_arguments. iter ( ) . map ( |k| k. expect_ty ( ) ) . collect ( )
2514- }
2515- _ => {
2514+ } else {
25162515 bug ! (
25172516 "argument to function with \" rust-call\" ABI \
2518- is not a tuple"
2517+ is not a tuple"
25192518 ) ;
25202519 }
2520+ } else {
2521+ bug ! (
2522+ "argument to function with \" rust-call\" ABI \
2523+ is not a tuple"
2524+ ) ;
25212525 }
25222526 } else {
25232527 assert ! ( sig. c_variadic || extra_args. is_empty( ) ) ;
You can’t perform that action at this time.
0 commit comments