Skip to content

Commit c61e497

Browse files
committed
Remove a duplicate branch
1 parent 9c90415 commit c61e497

File tree

1 file changed

+6
-11
lines changed
  • compiler/rustc_ty_utils/src

1 file changed

+6
-11
lines changed

compiler/rustc_ty_utils/src/abi.rs

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -560,20 +560,15 @@ fn fn_abi_new_uncached<'tcx>(
560560
let extra_args = if sig.abi == ExternAbi::RustCall {
561561
assert!(!sig.c_variadic && extra_args.is_empty());
562562

563-
if let Some(input) = sig.inputs().last() {
564-
if let ty::Tuple(tupled_arguments) = input.kind() {
565-
inputs = &sig.inputs()[0..sig.inputs().len() - 1];
566-
tupled_arguments
567-
} else {
568-
bug!(
569-
"argument to function with \"rust-call\" ABI \
570-
is not a tuple"
571-
);
572-
}
563+
if let Some(input) = sig.inputs().last()
564+
&& let ty::Tuple(tupled_arguments) = input.kind()
565+
{
566+
inputs = &sig.inputs()[0..sig.inputs().len() - 1];
567+
tupled_arguments
573568
} else {
574569
bug!(
575570
"argument to function with \"rust-call\" ABI \
576-
is not a tuple"
571+
is not a tuple"
577572
);
578573
}
579574
} else {

0 commit comments

Comments
 (0)