Skip to content

Commit 0e33c33

Browse files
committed
update tests to use proper error-in-other-file and use new conditions
1 parent 7f12d21 commit 0e33c33

File tree

860 files changed

+1481
-1448
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

860 files changed

+1481
-1448
lines changed

tests/ui-fulldeps/missing-rustc-driver-error.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Test that we get the following hint when trying to use a compiler crate without rustc_driver.
2-
//@error-pattern: try adding `extern crate rustc_driver;` at the top level of this crate
2+
//@error-in-other-file: try adding `extern crate rustc_driver;` at the top level of this crate
33
//@compile-flags: --emit link
44
// normalize-stderr-test ".*crate .* required.*\n\n" -> ""
55
// normalize-stderr-test: "aborting due to [0-9]+" -> "aborting due to NUMBER"

tests/ui/abi/abi-sysv64-arg-passing.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@
2424
// issue-62350-sysv-neg-reg-counts
2525
// struct-return
2626

27-
// ignore-android
28-
// ignore-arm
29-
// ignore-aarch64
30-
// ignore-windows
27+
//@ignore-target-android
28+
//@ignore-target-arm
29+
//@ignore-target-aarch64
30+
//@ignore-target-windows
3131

3232
// note: windows is ignored as rust_test_helpers does not have the sysv64 abi on windows
3333

tests/ui/abi/abi-sysv64-register-usage.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
// Checks if the correct registers are being used to pass arguments
33
// when the sysv64 ABI is specified.
44

5-
// ignore-android
6-
// ignore-arm
7-
// ignore-aarch64
5+
//@ignore-target-android
6+
//@ignore-target-arm
7+
//@ignore-target-aarch64
88
//@needs-asm-support
99

1010
#[cfg(target_arch = "x86_64")]

tests/ui/abi/anon-extern-mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//@run
22
// pretty-expanded FIXME #23616
3-
// ignore-wasm32-bare no libc to test ffi with
3+
//@ignore-target-wasm32-unknown-unknown no libc to test ffi with
44

55
#![feature(rustc_private)]
66

tests/ui/abi/c-stack-as-value.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//@run
22
// pretty-expanded FIXME #23616
3-
// ignore-wasm32-bare no libc to test ffi with
3+
//@ignore-target-wasm32-unknown-unknown no libc to test ffi with
44

55
#![feature(rustc_private)]
66

tests/ui/abi/c-stack-returning-int64.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//@run
2-
// ignore-wasm32-bare no libc to test with
3-
// ignore-sgx no libc
2+
//@ignore-target-wasm32-unknown-unknown no libc to test with
3+
//@ignore-target-sgx no libc
44

55
#![feature(rustc_private)]
66

tests/ui/abi/cabi-int-widening.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
//@run
2-
// ignore-wasm32-bare no libc to test ffi with
2+
//@ignore-target-wasm32-unknown-unknown no libc to test ffi with
33

44
#[link(name = "rust_test_helpers", kind = "static")]
55
extern "C" {
66
fn rust_int8_to_int32(_: i8) -> i32;
77
}
88

99
fn main() {
10-
let x = unsafe {
11-
rust_int8_to_int32(-1)
12-
};
10+
let x = unsafe { rust_int8_to_int32(-1) };
1311

1412
assert!(x == -1);
1513
}

tests/ui/abi/cross-crate/anon-extern-mod-cross-crate-2.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//@run
22
//@aux-build:anon-extern-mod-cross-crate-1.rs
33
// pretty-expanded FIXME #23616
4-
// ignore-wasm32-bare no libc to test ffi with
4+
//@ignore-target-wasm32-unknown-unknown no libc to test ffi with
55

66
extern crate anonexternmod;
77

tests/ui/abi/cross-crate/duplicated-external-mods.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
//@aux-build:anon-extern-mod-cross-crate-1.rs
33
//@aux-build:anon-extern-mod-cross-crate-1.rs
44
// pretty-expanded FIXME #23616
5-
// ignore-wasm32-bare no libc to test ffi with
5+
//@ignore-target-wasm32-unknown-unknown no libc to test ffi with
66

77
extern crate anonexternmod;
88

9-
pub fn main() { }
9+
pub fn main() {}

tests/ui/abi/extern/extern-call-deep.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//@run
2-
// ignore-wasm32-bare no libc to test ffi with
3-
// ignore-emscripten blows the JS stack
2+
//@ignore-target-wasm32-unknown-unknown no libc to test ffi with
3+
//@ignore-target-emscripten blows the JS stack
44

55
#![feature(rustc_private)]
66

tests/ui/abi/extern/extern-call-deep2.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//@run
22
#![allow(unused_must_use)]
3-
// ignore-emscripten no threads support
3+
//@ignore-target-emscripten no threads support
44
#![feature(rustc_private)]
55

66
extern crate libc;

tests/ui/abi/extern/extern-call-indirect.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//@run
2-
// ignore-wasm32-bare no libc to test ffi with
2+
//@ignore-target-wasm32-unknown-unknown no libc to test ffi with
33

44
#![feature(rustc_private)]
55

tests/ui/abi/extern/extern-call-scrub.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// make sure the stack pointers are maintained properly in both
55
// directions
66

7-
// ignore-emscripten no threads support
7+
//@ignore-target-emscripten no threads support
88
#![feature(rustc_private)]
99

1010
extern crate libc;

tests/ui/abi/extern/extern-crosscrate.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//@run
22
//@aux-build:extern-crosscrate-source.rs
3-
// ignore-wasm32-bare no libc to test ffi with
3+
//@ignore-target-wasm32-unknown-unknown no libc to test ffi with
44

55
#![feature(rustc_private)]
66

tests/ui/abi/extern/extern-pass-TwoU16s.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//@run
22
#![allow(improper_ctypes)]
33

4-
// ignore-wasm32-bare no libc for ffi testing
4+
//@ignore-target-wasm32-unknown-unknown no libc for ffi testing
55

66
// Test a foreign function that accepts and returns a struct
77
// by value.

tests/ui/abi/extern/extern-pass-TwoU32s.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//@run
22
#![allow(improper_ctypes)]
33

4-
// ignore-wasm32-bare no libc for ffi testing
4+
//@ignore-target-wasm32-unknown-unknown no libc for ffi testing
55

66
// Test a foreign function that accepts and returns a struct
77
// by value.

tests/ui/abi/extern/extern-pass-TwoU64s.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//@run
22
#![allow(improper_ctypes)]
33

4-
// ignore-wasm32-bare no libc for ffi testing
4+
//@ignore-target-wasm32-unknown-unknown no libc for ffi testing
55

66
// Test a foreign function that accepts and returns a struct
77
// by value.

tests/ui/abi/extern/extern-pass-TwoU8s.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//@run
22
#![allow(improper_ctypes)]
33

4-
// ignore-wasm32-bare no libc for ffi testing
4+
//@ignore-target-wasm32-unknown-unknown no libc for ffi testing
55

66
// Test a foreign function that accepts and returns a struct
77
// by value.

tests/ui/abi/extern/extern-pass-char.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//@run
2-
// ignore-wasm32-bare no libc for ffi testing
2+
//@ignore-target-wasm32-unknown-unknown no libc for ffi testing
33

44
// Test a function that takes/returns a u8.
55

tests/ui/abi/extern/extern-pass-double.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//@run
2-
// ignore-wasm32-bare no libc for ffi testing
2+
//@ignore-target-wasm32-unknown-unknown no libc for ffi testing
33

44
#[link(name = "rust_test_helpers", kind = "static")]
55
extern "C" {

tests/ui/abi/extern/extern-pass-empty.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
// Test a foreign function that accepts empty struct.
55

66
// pretty-expanded FIXME #23616
7-
// ignore-msvc
8-
// ignore-emscripten emcc asserts on an empty struct as an argument
7+
//@ignore-target-msvc
8+
//@ignore-target-emscripten emcc asserts on an empty struct as an argument
99

1010
#[repr(C)]
1111
struct TwoU8s {

tests/ui/abi/extern/extern-pass-u32.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//@run
2-
// ignore-wasm32-bare no libc for ffi testing
2+
//@ignore-target-wasm32-unknown-unknown no libc for ffi testing
33

44
// Test a function that takes/returns a u32.
55

tests/ui/abi/extern/extern-pass-u64.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//@run
2-
// ignore-wasm32-bare no libc for ffi testing
2+
//@ignore-target-wasm32-unknown-unknown no libc for ffi testing
33

44
// Test a call to a function that takes/returns a u64.
55

tests/ui/abi/extern/extern-return-TwoU16s.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//@run
22
#![allow(improper_ctypes)]
33

4-
// ignore-wasm32-bare no libc to test ffi with
4+
//@ignore-target-wasm32-unknown-unknown no libc to test ffi with
55

66
pub struct TwoU16s {
77
one: u16,

tests/ui/abi/extern/extern-return-TwoU32s.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//@run
22
#![allow(improper_ctypes)]
33

4-
// ignore-wasm32-bare no libc to test ffi with
4+
//@ignore-target-wasm32-unknown-unknown no libc to test ffi with
55

66
pub struct TwoU32s {
77
one: u32,

tests/ui/abi/extern/extern-return-TwoU64s.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//@run
22
#![allow(improper_ctypes)]
33

4-
// ignore-wasm32-bare no libc to test ffi with
4+
//@ignore-target-wasm32-unknown-unknown no libc to test ffi with
55

66
pub struct TwoU64s {
77
one: u64,

tests/ui/abi/extern/extern-return-TwoU8s.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//@run
22
#![allow(improper_ctypes)]
33

4-
// ignore-wasm32-bare no libc to test ffi with
4+
//@ignore-target-wasm32-unknown-unknown no libc to test ffi with
55

66
pub struct TwoU8s {
77
one: u8,

tests/ui/abi/foreign/foreign-call-no-runtime.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//@run
2-
// ignore-emscripten no threads support
2+
//@ignore-target-emscripten no threads support
33

44
#![feature(rustc_private)]
55

tests/ui/abi/foreign/foreign-dupe.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
//@run
22
//@aux-build:foreign_lib.rs
3-
// ignore-wasm32-bare no libc to test ffi with
3+
//@ignore-target-wasm32-unknown-unknown no libc to test ffi with
44

55
// Check that we can still call duplicated extern (imported) functions
66
// which were declared in another crate. See issues #32740 and #32783.
77

8-
98
extern crate foreign_lib;
109

1110
pub fn main() {

tests/ui/abi/foreign/foreign-fn-with-byval.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//@run
22
#![allow(improper_ctypes, improper_ctypes_definitions)]
33

4-
// ignore-wasm32-bare no libc to test ffi with
4+
//@ignore-target-wasm32-unknown-unknown no libc to test ffi with
55

66
#[derive(Copy, Clone)]
77
pub struct S {

tests/ui/abi/foreign/foreign-no-abi.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//@run
22
// ABI is cdecl by default
33

4-
// ignore-wasm32-bare no libc to test ffi with
4+
//@ignore-target-wasm32-unknown-unknown no libc to test ffi with
55
// pretty-expanded FIXME #23616
66

77
#![feature(rustc_private)]

tests/ui/abi/foreign/invoke-external-foreign.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//@run
22
//@aux-build:foreign_lib.rs
3-
// ignore-wasm32-bare no libc to test ffi with
3+
//@ignore-target-wasm32-unknown-unknown no libc to test ffi with
44

55
// The purpose of this test is to check that we can
66
// successfully (and safely) invoke external, cdecl

tests/ui/abi/homogenous-floats-target-feature-mixup.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
// without #[repr(simd)]
66

77
//@run
8-
// ignore-emscripten
9-
// ignore-sgx no processes
8+
//@ignore-target-emscripten
9+
//@ignore-target-sgx no processes
1010

1111
#![feature(avx512_target_feature)]
1212

tests/ui/abi/issue-28676.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#![allow(dead_code)]
33
#![allow(improper_ctypes)]
44

5-
// ignore-wasm32-bare no libc to test ffi with
5+
//@ignore-target-wasm32-unknown-unknown no libc to test ffi with
66

77
#[derive(Copy, Clone)]
88
pub struct Quad {

tests/ui/abi/issues/issue-62350-sysv-neg-reg-counts.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#![allow(dead_code)]
33
#![allow(improper_ctypes)]
44

5-
// ignore-wasm32-bare no libc to test ffi with
5+
//@ignore-target-wasm32-unknown-unknown no libc to test ffi with
66

77
#[derive(Copy, Clone)]
88
pub struct QuadFloats {

tests/ui/abi/issues/issue-97463-broken-abi-leaked-uninit-data.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//@run
2-
// ignore-wasm
2+
//@ignore-target-wasm
33
#![allow(dead_code)]
44
#![allow(improper_ctypes)]
55

tests/ui/abi/lib-defaults.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//@run
22
// dont-check-compiler-stderr (rust-lang/rust#54222)
33

4-
// ignore-wasm32-bare no libc to test ffi with
4+
//@ignore-target-wasm32-unknown-unknown no libc to test ffi with
55

66
//@compile-flags: -lrust_test_helpers
77

tests/ui/abi/mir/mir_codegen_calls_variadic.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//@run
2-
// ignore-wasm32-bare no libc to test ffi with
2+
//@ignore-target-wasm32-unknown-unknown no libc to test ffi with
33

44
#[link(name = "rust_test_helpers", kind = "static")]
55
extern "C" {

tests/ui/abi/numbers-arithmetic/i128-ffi.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
// C compilers have very inconsistent views on how the ABI
66
// should look like.
77

8-
// ignore-windows
9-
// ignore-32bit
8+
//@ignore-target-windows
9+
//@ignore-32bit
1010

1111
#[link(name = "rust_test_helpers", kind = "static")]
1212
extern "C" {

tests/ui/abi/segfault-no-out-of-stack.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
//@run
22

33
#![allow(unused_imports)]
4-
// ignore-emscripten can't run commands
5-
// ignore-sgx no processes
6-
// ignore-fuchsia must translate zircon signal to SIGSEGV/SIGBUS, FIXME (#58590)
4+
//@ignore-target-emscripten can't run commands
5+
//@ignore-target-sgx no processes
6+
//@ignore-target-fuchsia must translate zircon signal to SIGSEGV/SIGBUS, FIXME (#58590)
77
#![feature(rustc_private)]
88

99
extern crate libc;

0 commit comments

Comments
 (0)