@@ -508,6 +508,154 @@ error: ABIs are not compatible
508
508
LL | type TestAbiNe = (fn(u8), fn(u32));
509
509
| ^^^^^^^^^^^^^^
510
510
511
+ error: ABIs are not compatible
512
+ left ABI = FnAbi {
513
+ args: [
514
+ ArgAbi {
515
+ layout: TyAndLayout {
516
+ ty: [u8; 32],
517
+ layout: Layout {
518
+ size: Size(32 bytes),
519
+ align: AbiAndPrefAlign {
520
+ abi: $SOME_ALIGN,
521
+ pref: $SOME_ALIGN,
522
+ },
523
+ abi: Aggregate {
524
+ sized: true,
525
+ },
526
+ fields: Array {
527
+ stride: Size(1 bytes),
528
+ count: 32,
529
+ },
530
+ largest_niche: None,
531
+ variants: Single {
532
+ index: 0,
533
+ },
534
+ max_repr_align: None,
535
+ unadjusted_abi_align: $SOME_ALIGN,
536
+ },
537
+ },
538
+ mode: Indirect {
539
+ attrs: ArgAttributes {
540
+ regular: NoAlias | NoCapture | NonNull | NoUndef,
541
+ arg_ext: None,
542
+ pointee_size: Size(32 bytes),
543
+ pointee_align: Some(
544
+ Align(1 bytes),
545
+ ),
546
+ },
547
+ extra_attrs: None,
548
+ on_stack: false,
549
+ },
550
+ },
551
+ ],
552
+ ret: ArgAbi {
553
+ layout: TyAndLayout {
554
+ ty: (),
555
+ layout: Layout {
556
+ size: Size(0 bytes),
557
+ align: AbiAndPrefAlign {
558
+ abi: $SOME_ALIGN,
559
+ pref: $SOME_ALIGN,
560
+ },
561
+ abi: Aggregate {
562
+ sized: true,
563
+ },
564
+ fields: Arbitrary {
565
+ offsets: [],
566
+ memory_index: [],
567
+ },
568
+ largest_niche: None,
569
+ variants: Single {
570
+ index: 0,
571
+ },
572
+ max_repr_align: None,
573
+ unadjusted_abi_align: $SOME_ALIGN,
574
+ },
575
+ },
576
+ mode: Ignore,
577
+ },
578
+ c_variadic: false,
579
+ fixed_count: 1,
580
+ conv: Rust,
581
+ can_unwind: $SOME_BOOL,
582
+ }
583
+ right ABI = FnAbi {
584
+ args: [
585
+ ArgAbi {
586
+ layout: TyAndLayout {
587
+ ty: [u32; 32],
588
+ layout: Layout {
589
+ size: Size(128 bytes),
590
+ align: AbiAndPrefAlign {
591
+ abi: $SOME_ALIGN,
592
+ pref: $SOME_ALIGN,
593
+ },
594
+ abi: Aggregate {
595
+ sized: true,
596
+ },
597
+ fields: Array {
598
+ stride: Size(4 bytes),
599
+ count: 32,
600
+ },
601
+ largest_niche: None,
602
+ variants: Single {
603
+ index: 0,
604
+ },
605
+ max_repr_align: None,
606
+ unadjusted_abi_align: $SOME_ALIGN,
607
+ },
608
+ },
609
+ mode: Indirect {
610
+ attrs: ArgAttributes {
611
+ regular: NoAlias | NoCapture | NonNull | NoUndef,
612
+ arg_ext: None,
613
+ pointee_size: Size(128 bytes),
614
+ pointee_align: Some(
615
+ Align(4 bytes),
616
+ ),
617
+ },
618
+ extra_attrs: None,
619
+ on_stack: false,
620
+ },
621
+ },
622
+ ],
623
+ ret: ArgAbi {
624
+ layout: TyAndLayout {
625
+ ty: (),
626
+ layout: Layout {
627
+ size: Size(0 bytes),
628
+ align: AbiAndPrefAlign {
629
+ abi: $SOME_ALIGN,
630
+ pref: $SOME_ALIGN,
631
+ },
632
+ abi: Aggregate {
633
+ sized: true,
634
+ },
635
+ fields: Arbitrary {
636
+ offsets: [],
637
+ memory_index: [],
638
+ },
639
+ largest_niche: None,
640
+ variants: Single {
641
+ index: 0,
642
+ },
643
+ max_repr_align: None,
644
+ unadjusted_abi_align: $SOME_ALIGN,
645
+ },
646
+ },
647
+ mode: Ignore,
648
+ },
649
+ c_variadic: false,
650
+ fixed_count: 1,
651
+ conv: Rust,
652
+ can_unwind: $SOME_BOOL,
653
+ }
654
+ --> $DIR/debug.rs:43:1
655
+ |
656
+ LL | type TestAbiNeLarger = (fn([u8; 32]), fn([u32; 32]));
657
+ | ^^^^^^^^^^^^^^^^^^^^
658
+
511
659
error: ABIs are not compatible
512
660
left ABI = FnAbi {
513
661
args: [
@@ -646,7 +794,7 @@ error: ABIs are not compatible
646
794
conv: Rust,
647
795
can_unwind: $SOME_BOOL,
648
796
}
649
- --> $DIR/debug.rs:43 :1
797
+ --> $DIR/debug.rs:46 :1
650
798
|
651
799
LL | type TestAbiNeFloat = (fn(f32), fn(u32));
652
800
| ^^^^^^^^^^^^^^^^^^^
@@ -792,10 +940,10 @@ error: ABIs are not compatible
792
940
conv: Rust,
793
941
can_unwind: $SOME_BOOL,
794
942
}
795
- --> $DIR/debug.rs:47 :1
943
+ --> $DIR/debug.rs:50 :1
796
944
|
797
945
LL | type TestAbiNeSign = (fn(i32), fn(u32));
798
946
| ^^^^^^^^^^^^^^^^^^
799
947
800
- error: aborting due to 9 previous errors
948
+ error: aborting due to 10 previous errors
801
949
0 commit comments