diff options
| author | Jubilee Young <workingjubilee@gmail.com> | 2025-07-04 17:26:08 -0700 |
|---|---|---|
| committer | Jubilee Young <workingjubilee@gmail.com> | 2025-07-04 18:13:58 -0700 |
| commit | 64bec0ffdb413edb067a15fa0275128766d9554c (patch) | |
| tree | f83dc94aacad31d9452d21e3d849bbdf519cbf74 | |
| parent | 57d989b66ab8c3d9f4b44cb1396f74e488ebb0e8 (diff) | |
| download | rust-64bec0ffdb413edb067a15fa0275128766d9554c.tar.gz rust-64bec0ffdb413edb067a15fa0275128766d9554c.zip | |
Fix tests/ui/abi/debug.rs to cross-compile for riscv64
| -rw-r--r-- | tests/ui/abi/debug.generic.stderr | 30 | ||||
| -rw-r--r-- | tests/ui/abi/debug.riscv64.stderr | 30 | ||||
| -rw-r--r-- | tests/ui/abi/debug.rs | 3 |
3 files changed, 32 insertions, 31 deletions
diff --git a/tests/ui/abi/debug.generic.stderr b/tests/ui/abi/debug.generic.stderr index 68df57e56ac..3b29efc8102 100644 --- a/tests/ui/abi/debug.generic.stderr +++ b/tests/ui/abi/debug.generic.stderr @@ -89,9 +89,9 @@ error: fn_abi_of(test) = FnAbi { conv: Rust, can_unwind: $SOME_BOOL, } - --> $DIR/debug.rs:19:1 + --> $DIR/debug.rs:27:1 | -LL | fn test(_x: u8) -> bool { true } +LL | fn test(_x: u8) -> bool { | ^^^^^^^^^^^^^^^^^^^^^^^ error: fn_abi_of(TestFnPtr) = FnAbi { @@ -185,7 +185,7 @@ error: fn_abi_of(TestFnPtr) = FnAbi { conv: Rust, can_unwind: $SOME_BOOL, } - --> $DIR/debug.rs:22:1 + --> $DIR/debug.rs:33:1 | LL | type TestFnPtr = fn(bool) -> u8; | ^^^^^^^^^^^^^^ @@ -263,13 +263,13 @@ error: fn_abi_of(test_generic) = FnAbi { conv: Rust, can_unwind: $SOME_BOOL, } - --> $DIR/debug.rs:25:1 + --> $DIR/debug.rs:36:1 | -LL | fn test_generic<T>(_x: *const T) { } +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:28:1 + --> $DIR/debug.rs:39:1 | LL | const C: () = (); | ^^^^^^^^^^^ @@ -419,7 +419,7 @@ error: ABIs are not compatible conv: Rust, can_unwind: $SOME_BOOL, } - --> $DIR/debug.rs:44:1 + --> $DIR/debug.rs:55:1 | LL | type TestAbiNe = (fn(u8), fn(u32)); | ^^^^^^^^^^^^^^ @@ -571,7 +571,7 @@ error: ABIs are not compatible conv: Rust, can_unwind: $SOME_BOOL, } - --> $DIR/debug.rs:47:1 + --> $DIR/debug.rs:58:1 | LL | type TestAbiNeLarger = (fn([u8; 32]), fn([u32; 32])); | ^^^^^^^^^^^^^^^^^^^^ @@ -720,7 +720,7 @@ error: ABIs are not compatible conv: Rust, can_unwind: $SOME_BOOL, } - --> $DIR/debug.rs:50:1 + --> $DIR/debug.rs:61:1 | LL | type TestAbiNeFloat = (fn(f32), fn(u32)); | ^^^^^^^^^^^^^^^^^^^ @@ -870,13 +870,13 @@ error: ABIs are not compatible conv: Rust, can_unwind: $SOME_BOOL, } - --> $DIR/debug.rs:54:1 + --> $DIR/debug.rs:65: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:57:46 + --> $DIR/debug.rs:68:46 | LL | type TestAbiEqNonsense = (fn((str, str)), fn((str, str))); | ^^^^^^^^^^ doesn't have a size known at compile-time @@ -885,13 +885,13 @@ LL | type TestAbiEqNonsense = (fn((str, str)), fn((str, str))); = note: only the last element of a tuple may have a dynamically sized type error: unrecognized argument - --> $DIR/debug.rs:59:13 + --> $DIR/debug.rs:70:13 | LL | #[rustc_abi("assert_eq")] | ^^^^^^^^^^^ error: `#[rustc_abi]` can only be applied to function items, type aliases, and associated functions - --> $DIR/debug.rs:32:5 + --> $DIR/debug.rs:43:5 | LL | const C: () = (); | ^^^^^^^^^^^ @@ -981,9 +981,9 @@ error: fn_abi_of(assoc_test) = FnAbi { conv: Rust, can_unwind: $SOME_BOOL, } - --> $DIR/debug.rs:37:5 + --> $DIR/debug.rs:48:5 | -LL | fn assoc_test(&self) { } +LL | fn assoc_test(&self) {} | ^^^^^^^^^^^^^^^^^^^^ error: aborting due to 12 previous errors diff --git a/tests/ui/abi/debug.riscv64.stderr b/tests/ui/abi/debug.riscv64.stderr index e5f7af7d584..2417396de2f 100644 --- a/tests/ui/abi/debug.riscv64.stderr +++ b/tests/ui/abi/debug.riscv64.stderr @@ -89,9 +89,9 @@ error: fn_abi_of(test) = FnAbi { conv: Rust, can_unwind: $SOME_BOOL, } - --> $DIR/debug.rs:19:1 + --> $DIR/debug.rs:27:1 | -LL | fn test(_x: u8) -> bool { true } +LL | fn test(_x: u8) -> bool { | ^^^^^^^^^^^^^^^^^^^^^^^ error: fn_abi_of(TestFnPtr) = FnAbi { @@ -185,7 +185,7 @@ error: fn_abi_of(TestFnPtr) = FnAbi { conv: Rust, can_unwind: $SOME_BOOL, } - --> $DIR/debug.rs:22:1 + --> $DIR/debug.rs:33:1 | LL | type TestFnPtr = fn(bool) -> u8; | ^^^^^^^^^^^^^^ @@ -263,13 +263,13 @@ error: fn_abi_of(test_generic) = FnAbi { conv: Rust, can_unwind: $SOME_BOOL, } - --> $DIR/debug.rs:25:1 + --> $DIR/debug.rs:36:1 | -LL | fn test_generic<T>(_x: *const T) { } +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:28:1 + --> $DIR/debug.rs:39:1 | LL | const C: () = (); | ^^^^^^^^^^^ @@ -419,7 +419,7 @@ error: ABIs are not compatible conv: Rust, can_unwind: $SOME_BOOL, } - --> $DIR/debug.rs:44:1 + --> $DIR/debug.rs:55:1 | LL | type TestAbiNe = (fn(u8), fn(u32)); | ^^^^^^^^^^^^^^ @@ -571,7 +571,7 @@ error: ABIs are not compatible conv: Rust, can_unwind: $SOME_BOOL, } - --> $DIR/debug.rs:47:1 + --> $DIR/debug.rs:58:1 | LL | type TestAbiNeLarger = (fn([u8; 32]), fn([u32; 32])); | ^^^^^^^^^^^^^^^^^^^^ @@ -720,7 +720,7 @@ error: ABIs are not compatible conv: Rust, can_unwind: $SOME_BOOL, } - --> $DIR/debug.rs:50:1 + --> $DIR/debug.rs:61:1 | LL | type TestAbiNeFloat = (fn(f32), fn(u32)); | ^^^^^^^^^^^^^^^^^^^ @@ -870,13 +870,13 @@ error: ABIs are not compatible conv: Rust, can_unwind: $SOME_BOOL, } - --> $DIR/debug.rs:54:1 + --> $DIR/debug.rs:65: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:57:46 + --> $DIR/debug.rs:68:46 | LL | type TestAbiEqNonsense = (fn((str, str)), fn((str, str))); | ^^^^^^^^^^ doesn't have a size known at compile-time @@ -885,13 +885,13 @@ LL | type TestAbiEqNonsense = (fn((str, str)), fn((str, str))); = note: only the last element of a tuple may have a dynamically sized type error: unrecognized argument - --> $DIR/debug.rs:59:13 + --> $DIR/debug.rs:70:13 | LL | #[rustc_abi("assert_eq")] | ^^^^^^^^^^^ error: `#[rustc_abi]` can only be applied to function items, type aliases, and associated functions - --> $DIR/debug.rs:32:5 + --> $DIR/debug.rs:43:5 | LL | const C: () = (); | ^^^^^^^^^^^ @@ -981,9 +981,9 @@ error: fn_abi_of(assoc_test) = FnAbi { conv: Rust, can_unwind: $SOME_BOOL, } - --> $DIR/debug.rs:37:5 + --> $DIR/debug.rs:48:5 | -LL | fn assoc_test(&self) { } +LL | fn assoc_test(&self) {} | ^^^^^^^^^^^^^^^^^^^^ error: aborting due to 12 previous errors diff --git a/tests/ui/abi/debug.rs b/tests/ui/abi/debug.rs index 6a61fca3906..cc1589d8621 100644 --- a/tests/ui/abi/debug.rs +++ b/tests/ui/abi/debug.rs @@ -9,7 +9,8 @@ // Some attributes are only computed for release builds: //@ compile-flags: -O //@ revisions: generic riscv64 -//@ [riscv64] only-riscv64 +//@ [riscv64] compile-flags: --target riscv64gc-unknown-linux-gnu +//@ [riscv64] needs-llvm-components: riscv //@ [generic] ignore-riscv64 #![feature(rustc_attrs)] #![crate_type = "lib"] |
