Skip to content

Commit 8edb05c

Browse files
committed
test: ui: skip tests which aren't appropriate for RISC-V
1 parent 6279571 commit 8edb05c

26 files changed

+60
-42
lines changed

src/test/ui/borrowck/borrowck-asm.rs

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// ignore-powerpc
44
// ignore-powerpc64
55
// ignore-powerpc64le
6+
// ignore-riscv64
67
// ignore-sparc
78
// ignore-sparc64
89

src/test/ui/borrowck/borrowck-asm.stderr

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0382]: use of moved value: `x`
2-
--> $DIR/borrowck-asm.rs:24:17
2+
--> $DIR/borrowck-asm.rs:25:17
33
|
44
LL | let x = &mut 0isize;
55
| - move occurs because `x` has type `&mut isize`, which does not implement the `Copy` trait
@@ -11,7 +11,7 @@ LL | let z = x;
1111
| ^ value used here after move
1212

1313
error[E0503]: cannot use `x` because it was mutably borrowed
14-
--> $DIR/borrowck-asm.rs:31:37
14+
--> $DIR/borrowck-asm.rs:32:37
1515
|
1616
LL | let y = &mut x;
1717
| ------ borrow of `x` occurs here
@@ -23,7 +23,7 @@ LL | let z = y;
2323
| - borrow later used here
2424

2525
error[E0384]: cannot assign twice to immutable variable `x`
26-
--> $DIR/borrowck-asm.rs:39:36
26+
--> $DIR/borrowck-asm.rs:40:36
2727
|
2828
LL | let x = 3;
2929
| -
@@ -35,7 +35,7 @@ LL | llvm_asm!("nop" : "=r"(x));
3535
| ^ cannot assign twice to immutable variable
3636

3737
error[E0384]: cannot assign twice to immutable variable `x`
38-
--> $DIR/borrowck-asm.rs:53:36
38+
--> $DIR/borrowck-asm.rs:54:36
3939
|
4040
LL | let x = 3;
4141
| -
@@ -47,13 +47,13 @@ LL | llvm_asm!("nop" : "+r"(x));
4747
| ^ cannot assign twice to immutable variable
4848

4949
error[E0381]: use of possibly-uninitialized variable: `x`
50-
--> $DIR/borrowck-asm.rs:60:37
50+
--> $DIR/borrowck-asm.rs:61:37
5151
|
5252
LL | llvm_asm!("nop" : "=*r"(x));
5353
| ^ use of possibly-uninitialized `x`
5454

5555
error[E0506]: cannot assign to `x` because it is borrowed
56-
--> $DIR/borrowck-asm.rs:68:36
56+
--> $DIR/borrowck-asm.rs:69:36
5757
|
5858
LL | let y = &*x;
5959
| --- borrow of `x` occurs here
@@ -65,7 +65,7 @@ LL | let z = y;
6565
| - borrow later used here
6666

6767
error[E0382]: use of moved value: `x`
68-
--> $DIR/borrowck-asm.rs:76:45
68+
--> $DIR/borrowck-asm.rs:77:45
6969
|
7070
LL | let x = &mut 2;
7171
| - move occurs because `x` has type `&mut i32`, which does not implement the `Copy` trait

src/test/ui/c-variadic/variadic-ffi-1.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// ignore-arm stdcall isn't supported
22
// ignore-aarch64 stdcall isn't supported
3+
// ignore-riscv64 stdcall isn't supported
34

45
extern "stdcall" {
56
fn printf(_: *const u8, ...); //~ ERROR: variadic function must have C or cdecl calling

src/test/ui/c-variadic/variadic-ffi-1.stderr

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
error[E0045]: C-variadic function must have C or cdecl calling convention
2-
--> $DIR/variadic-ffi-1.rs:5:5
2+
--> $DIR/variadic-ffi-1.rs:6:5
33
|
44
LL | fn printf(_: *const u8, ...);
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C-variadics require C or cdecl calling convention
66

77
error[E0060]: this function takes at least 2 arguments but 0 arguments were supplied
8-
--> $DIR/variadic-ffi-1.rs:16:9
8+
--> $DIR/variadic-ffi-1.rs:17:9
99
|
1010
LL | fn foo(f: isize, x: u8, ...);
1111
| ----------------------------- defined here
@@ -16,7 +16,7 @@ LL | foo();
1616
| expected at least 2 arguments
1717

1818
error[E0060]: this function takes at least 2 arguments but 1 argument was supplied
19-
--> $DIR/variadic-ffi-1.rs:17:9
19+
--> $DIR/variadic-ffi-1.rs:18:9
2020
|
2121
LL | fn foo(f: isize, x: u8, ...);
2222
| ----------------------------- defined here
@@ -27,7 +27,7 @@ LL | foo(1);
2727
| expected at least 2 arguments
2828

2929
error[E0308]: mismatched types
30-
--> $DIR/variadic-ffi-1.rs:19:56
30+
--> $DIR/variadic-ffi-1.rs:20:56
3131
|
3232
LL | let x: unsafe extern "C" fn(f: isize, x: u8) = foo;
3333
| ------------------------------------- ^^^ expected non-variadic fn, found variadic function
@@ -38,7 +38,7 @@ LL | let x: unsafe extern "C" fn(f: isize, x: u8) = foo;
3838
found fn item `unsafe extern "C" fn(_, _, ...) {foo}`
3939

4040
error[E0308]: mismatched types
41-
--> $DIR/variadic-ffi-1.rs:20:54
41+
--> $DIR/variadic-ffi-1.rs:21:54
4242
|
4343
LL | let y: extern "C" fn(f: isize, x: u8, ...) = bar;
4444
| ----------------------------------- ^^^ expected variadic fn, found non-variadic function
@@ -49,37 +49,37 @@ LL | let y: extern "C" fn(f: isize, x: u8, ...) = bar;
4949
found fn item `extern "C" fn(_, _) {bar}`
5050

5151
error[E0617]: can't pass `f32` to variadic function
52-
--> $DIR/variadic-ffi-1.rs:22:19
52+
--> $DIR/variadic-ffi-1.rs:23:19
5353
|
5454
LL | foo(1, 2, 3f32);
5555
| ^^^^ help: cast the value to `c_double`: `3f32 as c_double`
5656

5757
error[E0617]: can't pass `bool` to variadic function
58-
--> $DIR/variadic-ffi-1.rs:23:19
58+
--> $DIR/variadic-ffi-1.rs:24:19
5959
|
6060
LL | foo(1, 2, true);
6161
| ^^^^ help: cast the value to `c_int`: `true as c_int`
6262

6363
error[E0617]: can't pass `i8` to variadic function
64-
--> $DIR/variadic-ffi-1.rs:24:19
64+
--> $DIR/variadic-ffi-1.rs:25:19
6565
|
6666
LL | foo(1, 2, 1i8);
6767
| ^^^ help: cast the value to `c_int`: `1i8 as c_int`
6868

6969
error[E0617]: can't pass `u8` to variadic function
70-
--> $DIR/variadic-ffi-1.rs:25:19
70+
--> $DIR/variadic-ffi-1.rs:26:19
7171
|
7272
LL | foo(1, 2, 1u8);
7373
| ^^^ help: cast the value to `c_uint`: `1u8 as c_uint`
7474

7575
error[E0617]: can't pass `i16` to variadic function
76-
--> $DIR/variadic-ffi-1.rs:26:19
76+
--> $DIR/variadic-ffi-1.rs:27:19
7777
|
7878
LL | foo(1, 2, 1i16);
7979
| ^^^^ help: cast the value to `c_int`: `1i16 as c_int`
8080

8181
error[E0617]: can't pass `u16` to variadic function
82-
--> $DIR/variadic-ffi-1.rs:27:19
82+
--> $DIR/variadic-ffi-1.rs:28:19
8383
|
8484
LL | foo(1, 2, 1u16);
8585
| ^^^^ help: cast the value to `c_uint`: `1u16 as c_uint`

src/test/ui/cfg/conditional-compile-arch.rs

+3
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,6 @@ pub fn main() { }
3636

3737
#[cfg(target_arch = "sparc64")]
3838
pub fn main() { }
39+
40+
#[cfg(target_arch = "riscv64")]
41+
pub fn main() { }

src/test/ui/extern/extern-methods.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// run-pass
22
// ignore-arm
33
// ignore-aarch64
4+
// ignore-riscv64 fastcall isn't supported
45

56
trait A {
67
extern "fastcall" fn test1(i: i32);

src/test/ui/extern/extern-thiscall.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// run-pass
22
// ignore-arm
33
// ignore-aarch64
4+
// ignore-riscv64 thiscall isn't supported
45

56
#![feature(abi_thiscall)]
67

src/test/ui/extern/extern-vectorcall.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// run-pass
22
// ignore-arm
33
// ignore-aarch64
4+
// ignore-riscv64 vectorcall isn't supported
45

56
#![feature(abi_vectorcall)]
67

src/test/ui/feature-gates/feature-gate-abi-msp430-interrupt.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// Test that the MSP430 interrupt ABI cannot be used when msp430_interrupt
22
// feature gate is not used.
33

4+
// ignore-riscv64 msp430 is not supported
5+
46
extern "msp430-interrupt" fn foo() {}
57
//~^ ERROR msp430-interrupt ABI is experimental and subject to change
68

src/test/ui/feature-gates/feature-gate-abi-msp430-interrupt.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0658]: msp430-interrupt ABI is experimental and subject to change
2-
--> $DIR/feature-gate-abi-msp430-interrupt.rs:4:8
2+
--> $DIR/feature-gate-abi-msp430-interrupt.rs:6:8
33
|
44
LL | extern "msp430-interrupt" fn foo() {}
55
| ^^^^^^^^^^^^^^^^^^

src/test/ui/llvm-asm/llvm-asm-bad-clobber.rs

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
// ignore-powerpc
77
// ignore-powerpc64
88
// ignore-powerpc64le
9+
// ignore-riscv64
910
// ignore-sparc
1011
// ignore-sparc64
1112
// ignore-mips

src/test/ui/llvm-asm/llvm-asm-bad-clobber.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0664]: clobber should not be surrounded by braces
2-
--> $DIR/llvm-asm-bad-clobber.rs:22:42
2+
--> $DIR/llvm-asm-bad-clobber.rs:23:42
33
|
44
LL | llvm_asm!("xor %eax, %eax" : : : "{eax}");
55
| ^^^^^^^

src/test/ui/llvm-asm/llvm-asm-in-bad-modifier.rs

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// ignore-powerpc
44
// ignore-powerpc64
55
// ignore-powerpc64le
6+
// ignore-riscv64
67
// ignore-sparc
78
// ignore-sparc64
89
// ignore-mips

src/test/ui/llvm-asm/llvm-asm-in-bad-modifier.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
error[E0662]: input operand constraint contains '='
2-
--> $DIR/llvm-asm-in-bad-modifier.rs:23:44
2+
--> $DIR/llvm-asm-in-bad-modifier.rs:24:44
33
|
44
LL | llvm_asm!("mov $1, $0" : "=r"(x) : "=r"(5));
55
| ^^^^
66

77
error[E0663]: input operand constraint contains '+'
8-
--> $DIR/llvm-asm-in-bad-modifier.rs:24:44
8+
--> $DIR/llvm-asm-in-bad-modifier.rs:25:44
99
|
1010
LL | llvm_asm!("mov $1, $0" : "=r"(y) : "+r"(5));
1111
| ^^^^

src/test/ui/llvm-asm/llvm-asm-misplaced-option.rs

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
// ignore-powerpc
88
// ignore-powerpc64
99
// ignore-powerpc64le
10+
// ignore-riscv64
1011
// ignore-sparc
1112
// ignore-sparc64
1213
// ignore-mips

src/test/ui/llvm-asm/llvm-asm-misplaced-option.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
warning: unrecognized option
2-
--> $DIR/llvm-asm-misplaced-option.rs:24:69
2+
--> $DIR/llvm-asm-misplaced-option.rs:25:69
33
|
44
LL | llvm_asm!("mov $1, $0" : "=r"(x) : "r"(5_usize), "0"(x) : : "cc");
55
| ^^^^
66

77
warning: expected a clobber, found an option
8-
--> $DIR/llvm-asm-misplaced-option.rs:31:85
8+
--> $DIR/llvm-asm-misplaced-option.rs:32:85
99
|
1010
LL | llvm_asm!("add $2, $1; mov $1, $0" : "=r"(x) : "r"(x), "r"(8_usize) : "cc", "volatile");
1111
| ^^^^^^^^^^

src/test/ui/llvm-asm/llvm-asm-out-assign-imm.rs

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// ignore-powerpc
44
// ignore-powerpc64
55
// ignore-powerpc64le
6+
// ignore-riscv64
67
// ignore-sparc
78
// ignore-sparc64
89
// ignore-mips

src/test/ui/llvm-asm/llvm-asm-out-assign-imm.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0384]: cannot assign twice to immutable variable `x`
2-
--> $DIR/llvm-asm-out-assign-imm.rs:24:39
2+
--> $DIR/llvm-asm-out-assign-imm.rs:25:39
33
|
44
LL | let x: isize;
55
| - help: make this binding mutable: `mut x`

src/test/ui/llvm-asm/llvm-asm-out-no-modifier.rs

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// ignore-powerpc
44
// ignore-powerpc64
55
// ignore-powerpc64le
6+
// ignore-riscv64
67
// ignore-sparc
78
// ignore-sparc64
89
// ignore-mips

src/test/ui/llvm-asm/llvm-asm-out-no-modifier.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0661]: output operand constraint lacks '=' or '+'
2-
--> $DIR/llvm-asm-out-no-modifier.rs:22:34
2+
--> $DIR/llvm-asm-out-no-modifier.rs:23:34
33
|
44
LL | llvm_asm!("mov $1, $0" : "r"(x) : "r"(5));
55
| ^^^

src/test/ui/llvm-asm/llvm-asm-out-read-uninit.rs

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// ignore-powerpc
44
// ignore-powerpc64
55
// ignore-powerpc64le
6+
// ignore-riscv64
67
// ignore-sparc
78
// ignore-sparc64
89
// ignore-mips

src/test/ui/llvm-asm/llvm-asm-out-read-uninit.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0381]: use of possibly-uninitialized variable: `x`
2-
--> $DIR/llvm-asm-out-read-uninit.rs:22:48
2+
--> $DIR/llvm-asm-out-read-uninit.rs:23:48
33
|
44
LL | llvm_asm!("mov $1, $0" : "=r"(x) : "r"(x));
55
| ^ use of possibly-uninitialized `x`

src/test/ui/target-feature/gate.rs

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
// ignore-powerpc
88
// ignore-powerpc64
99
// ignore-powerpc64le
10+
// ignore-riscv64
1011
// ignore-sparc
1112
// ignore-sparc64
1213
// ignore-s390x

src/test/ui/target-feature/gate.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0658]: the target feature `avx512bw` is currently unstable
2-
--> $DIR/gate.rs:30:18
2+
--> $DIR/gate.rs:31:18
33
|
44
LL | #[target_feature(enable = "avx512bw")]
55
| ^^^^^^^^^^^^^^^^^^^

src/test/ui/target-feature/invalid-attribute.rs

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
// ignore-powerpc
88
// ignore-powerpc64
99
// ignore-powerpc64le
10+
// ignore-riscv64
1011
// ignore-s390x
1112
// ignore-sparc
1213
// ignore-sparc64

0 commit comments

Comments
 (0)