Skip to content

Commit

Permalink
adjust UI tests
Browse files Browse the repository at this point in the history
  • Loading branch information
the8472 committed Jan 10, 2025
1 parent a75617c commit d7fb729
Show file tree
Hide file tree
Showing 33 changed files with 248 additions and 71 deletions.
2 changes: 2 additions & 0 deletions tests/ui/abi/c-zst.aarch64-darwin.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ error: fn_abi_of(pass_zst) = FnAbi {
},
max_repr_align: None,
unadjusted_abi_align: $SOME_ALIGN,
randomization_seed: 0,
},
},
mode: Ignore,
Expand Down Expand Up @@ -49,6 +50,7 @@ error: fn_abi_of(pass_zst) = FnAbi {
},
max_repr_align: None,
unadjusted_abi_align: $SOME_ALIGN,
randomization_seed: 0,
},
},
mode: Ignore,
Expand Down
2 changes: 2 additions & 0 deletions tests/ui/abi/c-zst.powerpc-linux.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ error: fn_abi_of(pass_zst) = FnAbi {
},
max_repr_align: None,
unadjusted_abi_align: $SOME_ALIGN,
randomization_seed: 0,
},
},
mode: Indirect {
Expand Down Expand Up @@ -60,6 +61,7 @@ error: fn_abi_of(pass_zst) = FnAbi {
},
max_repr_align: None,
unadjusted_abi_align: $SOME_ALIGN,
randomization_seed: 0,
},
},
mode: Ignore,
Expand Down
2 changes: 2 additions & 0 deletions tests/ui/abi/c-zst.s390x-linux.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ error: fn_abi_of(pass_zst) = FnAbi {
},
max_repr_align: None,
unadjusted_abi_align: $SOME_ALIGN,
randomization_seed: 0,
},
},
mode: Indirect {
Expand Down Expand Up @@ -60,6 +61,7 @@ error: fn_abi_of(pass_zst) = FnAbi {
},
max_repr_align: None,
unadjusted_abi_align: $SOME_ALIGN,
randomization_seed: 0,
},
},
mode: Ignore,
Expand Down
2 changes: 2 additions & 0 deletions tests/ui/abi/c-zst.sparc64-linux.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ error: fn_abi_of(pass_zst) = FnAbi {
},
max_repr_align: None,
unadjusted_abi_align: $SOME_ALIGN,
randomization_seed: 0,
},
},
mode: Indirect {
Expand Down Expand Up @@ -60,6 +61,7 @@ error: fn_abi_of(pass_zst) = FnAbi {
},
max_repr_align: None,
unadjusted_abi_align: $SOME_ALIGN,
randomization_seed: 0,
},
},
mode: Ignore,
Expand Down
2 changes: 2 additions & 0 deletions tests/ui/abi/c-zst.x86_64-linux.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ error: fn_abi_of(pass_zst) = FnAbi {
},
max_repr_align: None,
unadjusted_abi_align: $SOME_ALIGN,
randomization_seed: 0,
},
},
mode: Ignore,
Expand Down Expand Up @@ -49,6 +50,7 @@ error: fn_abi_of(pass_zst) = FnAbi {
},
max_repr_align: None,
unadjusted_abi_align: $SOME_ALIGN,
randomization_seed: 0,
},
},
mode: Ignore,
Expand Down
2 changes: 2 additions & 0 deletions tests/ui/abi/c-zst.x86_64-pc-windows-gnu.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ error: fn_abi_of(pass_zst) = FnAbi {
},
max_repr_align: None,
unadjusted_abi_align: $SOME_ALIGN,
randomization_seed: 0,
},
},
mode: Indirect {
Expand Down Expand Up @@ -60,6 +61,7 @@ error: fn_abi_of(pass_zst) = FnAbi {
},
max_repr_align: None,
unadjusted_abi_align: $SOME_ALIGN,
randomization_seed: 0,
},
},
mode: Ignore,
Expand Down
1 change: 1 addition & 0 deletions tests/ui/abi/debug.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
//@ normalize-stderr: "(abi|pref|unadjusted_abi_align): Align\([1-8] bytes\)" -> "$1: $$SOME_ALIGN"
//@ normalize-stderr: "randomization_seed: \d+" -> "randomization_seed: $$SEED"
//@ normalize-stderr: "(size): Size\([48] bytes\)" -> "$1: $$SOME_SIZE"
//@ normalize-stderr: "(can_unwind): (true|false)" -> "$1: $$SOME_BOOL"
//@ normalize-stderr: "(valid_range): 0\.\.=(4294967295|18446744073709551615)" -> "$1: $$FULL"
Expand Down
46 changes: 35 additions & 11 deletions tests/ui/abi/debug.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ error: fn_abi_of(test) = FnAbi {
},
max_repr_align: None,
unadjusted_abi_align: $SOME_ALIGN,
randomization_seed: $SEED,
},
},
mode: Direct(
Expand Down Expand Up @@ -71,6 +72,7 @@ error: fn_abi_of(test) = FnAbi {
},
max_repr_align: None,
unadjusted_abi_align: $SOME_ALIGN,
randomization_seed: $SEED,
},
},
mode: Direct(
Expand All @@ -87,7 +89,7 @@ error: fn_abi_of(test) = FnAbi {
conv: Rust,
can_unwind: $SOME_BOOL,
}
--> $DIR/debug.rs:15:1
--> $DIR/debug.rs:16:1
|
LL | fn test(_x: u8) -> bool { true }
| ^^^^^^^^^^^^^^^^^^^^^^^
Expand Down Expand Up @@ -128,6 +130,7 @@ error: fn_abi_of(TestFnPtr) = FnAbi {
},
max_repr_align: None,
unadjusted_abi_align: $SOME_ALIGN,
randomization_seed: $SEED,
},
},
mode: Direct(
Expand Down Expand Up @@ -165,6 +168,7 @@ error: fn_abi_of(TestFnPtr) = FnAbi {
},
max_repr_align: None,
unadjusted_abi_align: $SOME_ALIGN,
randomization_seed: $SEED,
},
},
mode: Direct(
Expand All @@ -181,7 +185,7 @@ error: fn_abi_of(TestFnPtr) = FnAbi {
conv: Rust,
can_unwind: $SOME_BOOL,
}
--> $DIR/debug.rs:18:1
--> $DIR/debug.rs:19:1
|
LL | type TestFnPtr = fn(bool) -> u8;
| ^^^^^^^^^^^^^^
Expand Down Expand Up @@ -214,6 +218,7 @@ error: fn_abi_of(test_generic) = FnAbi {
},
max_repr_align: None,
unadjusted_abi_align: $SOME_ALIGN,
randomization_seed: $SEED,
},
},
mode: Direct(
Expand Down Expand Up @@ -248,6 +253,7 @@ error: fn_abi_of(test_generic) = FnAbi {
},
max_repr_align: None,
unadjusted_abi_align: $SOME_ALIGN,
randomization_seed: $SEED,
},
},
mode: Ignore,
Expand All @@ -257,13 +263,13 @@ error: fn_abi_of(test_generic) = FnAbi {
conv: Rust,
can_unwind: $SOME_BOOL,
}
--> $DIR/debug.rs:21:1
--> $DIR/debug.rs:22:1
|
LL | fn test_generic<T>(_x: *const T) { }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: `#[rustc_abi]` can only be applied to function items, type aliases, and associated functions
--> $DIR/debug.rs:24:1
--> $DIR/debug.rs:25:1
|
LL | const C: () = ();
| ^^^^^^^^^^^
Expand Down Expand Up @@ -296,6 +302,7 @@ error: ABIs are not compatible
},
max_repr_align: None,
unadjusted_abi_align: $SOME_ALIGN,
randomization_seed: $SEED,
},
},
mode: Direct(
Expand Down Expand Up @@ -330,6 +337,7 @@ error: ABIs are not compatible
},
max_repr_align: None,
unadjusted_abi_align: $SOME_ALIGN,
randomization_seed: $SEED,
},
},
mode: Ignore,
Expand Down Expand Up @@ -366,6 +374,7 @@ error: ABIs are not compatible
},
max_repr_align: None,
unadjusted_abi_align: $SOME_ALIGN,
randomization_seed: $SEED,
},
},
mode: Direct(
Expand Down Expand Up @@ -400,6 +409,7 @@ error: ABIs are not compatible
},
max_repr_align: None,
unadjusted_abi_align: $SOME_ALIGN,
randomization_seed: $SEED,
},
},
mode: Ignore,
Expand All @@ -409,7 +419,7 @@ error: ABIs are not compatible
conv: Rust,
can_unwind: $SOME_BOOL,
}
--> $DIR/debug.rs:40:1
--> $DIR/debug.rs:41:1
|
LL | type TestAbiNe = (fn(u8), fn(u32));
| ^^^^^^^^^^^^^^
Expand Down Expand Up @@ -439,6 +449,7 @@ error: ABIs are not compatible
},
max_repr_align: None,
unadjusted_abi_align: $SOME_ALIGN,
randomization_seed: $SEED,
},
},
mode: Indirect {
Expand Down Expand Up @@ -477,6 +488,7 @@ error: ABIs are not compatible
},
max_repr_align: None,
unadjusted_abi_align: $SOME_ALIGN,
randomization_seed: $SEED,
},
},
mode: Ignore,
Expand Down Expand Up @@ -510,6 +522,7 @@ error: ABIs are not compatible
},
max_repr_align: None,
unadjusted_abi_align: $SOME_ALIGN,
randomization_seed: $SEED,
},
},
mode: Indirect {
Expand Down Expand Up @@ -548,6 +561,7 @@ error: ABIs are not compatible
},
max_repr_align: None,
unadjusted_abi_align: $SOME_ALIGN,
randomization_seed: $SEED,
},
},
mode: Ignore,
Expand All @@ -557,7 +571,7 @@ error: ABIs are not compatible
conv: Rust,
can_unwind: $SOME_BOOL,
}
--> $DIR/debug.rs:43:1
--> $DIR/debug.rs:44:1
|
LL | type TestAbiNeLarger = (fn([u8; 32]), fn([u32; 32]));
| ^^^^^^^^^^^^^^^^^^^^
Expand Down Expand Up @@ -589,6 +603,7 @@ error: ABIs are not compatible
},
max_repr_align: None,
unadjusted_abi_align: $SOME_ALIGN,
randomization_seed: $SEED,
},
},
mode: Direct(
Expand Down Expand Up @@ -623,6 +638,7 @@ error: ABIs are not compatible
},
max_repr_align: None,
unadjusted_abi_align: $SOME_ALIGN,
randomization_seed: $SEED,
},
},
mode: Ignore,
Expand Down Expand Up @@ -659,6 +675,7 @@ error: ABIs are not compatible
},
max_repr_align: None,
unadjusted_abi_align: $SOME_ALIGN,
randomization_seed: $SEED,
},
},
mode: Direct(
Expand Down Expand Up @@ -693,6 +710,7 @@ error: ABIs are not compatible
},
max_repr_align: None,
unadjusted_abi_align: $SOME_ALIGN,
randomization_seed: $SEED,
},
},
mode: Ignore,
Expand All @@ -702,7 +720,7 @@ error: ABIs are not compatible
conv: Rust,
can_unwind: $SOME_BOOL,
}
--> $DIR/debug.rs:46:1
--> $DIR/debug.rs:47:1
|
LL | type TestAbiNeFloat = (fn(f32), fn(u32));
| ^^^^^^^^^^^^^^^^^^^
Expand Down Expand Up @@ -735,6 +753,7 @@ error: ABIs are not compatible
},
max_repr_align: None,
unadjusted_abi_align: $SOME_ALIGN,
randomization_seed: $SEED,
},
},
mode: Direct(
Expand Down Expand Up @@ -769,6 +788,7 @@ error: ABIs are not compatible
},
max_repr_align: None,
unadjusted_abi_align: $SOME_ALIGN,
randomization_seed: $SEED,
},
},
mode: Ignore,
Expand Down Expand Up @@ -805,6 +825,7 @@ error: ABIs are not compatible
},
max_repr_align: None,
unadjusted_abi_align: $SOME_ALIGN,
randomization_seed: $SEED,
},
},
mode: Direct(
Expand Down Expand Up @@ -839,6 +860,7 @@ error: ABIs are not compatible
},
max_repr_align: None,
unadjusted_abi_align: $SOME_ALIGN,
randomization_seed: $SEED,
},
},
mode: Ignore,
Expand All @@ -848,13 +870,13 @@ error: ABIs are not compatible
conv: Rust,
can_unwind: $SOME_BOOL,
}
--> $DIR/debug.rs:50:1
--> $DIR/debug.rs:51:1
|
LL | type TestAbiNeSign = (fn(i32), fn(u32));
| ^^^^^^^^^^^^^^^^^^

error[E0277]: the size for values of type `str` cannot be known at compilation time
--> $DIR/debug.rs:53:46
--> $DIR/debug.rs:54:46
|
LL | type TestAbiEqNonsense = (fn((str, str)), fn((str, str)));
| ^^^^^^^^^^ doesn't have a size known at compile-time
Expand All @@ -863,7 +885,7 @@ LL | type TestAbiEqNonsense = (fn((str, str)), fn((str, str)));
= note: only the last element of a tuple may have a dynamically sized type

error: `#[rustc_abi]` can only be applied to function items, type aliases, and associated functions
--> $DIR/debug.rs:28:5
--> $DIR/debug.rs:29:5
|
LL | const C: () = ();
| ^^^^^^^^^^^
Expand Down Expand Up @@ -906,6 +928,7 @@ error: fn_abi_of(assoc_test) = FnAbi {
},
max_repr_align: None,
unadjusted_abi_align: $SOME_ALIGN,
randomization_seed: $SEED,
},
},
mode: Direct(
Expand Down Expand Up @@ -942,6 +965,7 @@ error: fn_abi_of(assoc_test) = FnAbi {
},
max_repr_align: None,
unadjusted_abi_align: $SOME_ALIGN,
randomization_seed: $SEED,
},
},
mode: Ignore,
Expand All @@ -951,7 +975,7 @@ error: fn_abi_of(assoc_test) = FnAbi {
conv: Rust,
can_unwind: $SOME_BOOL,
}
--> $DIR/debug.rs:33:5
--> $DIR/debug.rs:34:5
|
LL | fn assoc_test(&self) { }
| ^^^^^^^^^^^^^^^^^^^^
Expand Down
Loading

0 comments on commit d7fb729

Please sign in to comment.