Skip to content

Commit cfcb2b6

Browse files
committed
compiletest: ignore tests on a per-revision basis
Otherwise something that ought to seemingly work like `//[x86] needs-llvm-components: x86` or `//[nll_beyond]should-fail` do not get evaluated properly.
1 parent 493fe80 commit cfcb2b6

17 files changed

+357
-383
lines changed

src/test/ui/asm/inline-syntax.arm.stderr

+6-6
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ LL | .intel_syntax noprefix
1313
| ^
1414

1515
error: unknown directive
16-
--> $DIR/inline-syntax.rs:29:15
16+
--> $DIR/inline-syntax.rs:31:15
1717
|
1818
LL | asm!(".intel_syntax noprefix", "nop");
1919
| ^
@@ -25,7 +25,7 @@ LL | .intel_syntax noprefix
2525
| ^
2626

2727
error: unknown directive
28-
--> $DIR/inline-syntax.rs:32:15
28+
--> $DIR/inline-syntax.rs:34:15
2929
|
3030
LL | asm!(".intel_syntax aaa noprefix", "nop");
3131
| ^
@@ -37,7 +37,7 @@ LL | .intel_syntax aaa noprefix
3737
| ^
3838

3939
error: unknown directive
40-
--> $DIR/inline-syntax.rs:35:15
40+
--> $DIR/inline-syntax.rs:37:15
4141
|
4242
LL | asm!(".att_syntax noprefix", "nop");
4343
| ^
@@ -49,7 +49,7 @@ LL | .att_syntax noprefix
4949
| ^
5050

5151
error: unknown directive
52-
--> $DIR/inline-syntax.rs:38:15
52+
--> $DIR/inline-syntax.rs:40:15
5353
|
5454
LL | asm!(".att_syntax bbb noprefix", "nop");
5555
| ^
@@ -61,7 +61,7 @@ LL | .att_syntax bbb noprefix
6161
| ^
6262

6363
error: unknown directive
64-
--> $DIR/inline-syntax.rs:41:15
64+
--> $DIR/inline-syntax.rs:43:15
6565
|
6666
LL | asm!(".intel_syntax noprefix; nop");
6767
| ^
@@ -73,7 +73,7 @@ LL | .intel_syntax noprefix; nop
7373
| ^
7474

7575
error: unknown directive
76-
--> $DIR/inline-syntax.rs:47:13
76+
--> $DIR/inline-syntax.rs:49:13
7777
|
7878
LL | .intel_syntax noprefix
7979
| ^

src/test/ui/asm/inline-syntax.x86_64.stderr

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,43 @@
11
warning: avoid using `.intel_syntax`, Intel syntax is the default
2-
--> $DIR/inline-syntax.rs:55:14
2+
--> $DIR/inline-syntax.rs:57:14
33
|
44
LL | global_asm!(".intel_syntax noprefix", "nop");
55
| ^^^^^^^^^^^^^^^^^^^^^^
66
|
77
= note: `#[warn(bad_asm_style)]` on by default
88

99
warning: avoid using `.intel_syntax`, Intel syntax is the default
10-
--> $DIR/inline-syntax.rs:29:15
10+
--> $DIR/inline-syntax.rs:31:15
1111
|
1212
LL | asm!(".intel_syntax noprefix", "nop");
1313
| ^^^^^^^^^^^^^^^^^^^^^^
1414

1515
warning: avoid using `.intel_syntax`, Intel syntax is the default
16-
--> $DIR/inline-syntax.rs:32:15
16+
--> $DIR/inline-syntax.rs:34:15
1717
|
1818
LL | asm!(".intel_syntax aaa noprefix", "nop");
1919
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
2020

2121
warning: avoid using `.att_syntax`, prefer using `options(att_syntax)` instead
22-
--> $DIR/inline-syntax.rs:35:15
22+
--> $DIR/inline-syntax.rs:37:15
2323
|
2424
LL | asm!(".att_syntax noprefix", "nop");
2525
| ^^^^^^^^^^^^^^^^^^^^
2626

2727
warning: avoid using `.att_syntax`, prefer using `options(att_syntax)` instead
28-
--> $DIR/inline-syntax.rs:38:15
28+
--> $DIR/inline-syntax.rs:40:15
2929
|
3030
LL | asm!(".att_syntax bbb noprefix", "nop");
3131
| ^^^^^^^^^^^^^^^^^^^^^^^^
3232

3333
warning: avoid using `.intel_syntax`, Intel syntax is the default
34-
--> $DIR/inline-syntax.rs:41:15
34+
--> $DIR/inline-syntax.rs:43:15
3535
|
3636
LL | asm!(".intel_syntax noprefix; nop");
3737
| ^^^^^^^^^^^^^^^^^^^^^^
3838

3939
warning: avoid using `.intel_syntax`, Intel syntax is the default
40-
--> $DIR/inline-syntax.rs:47:13
40+
--> $DIR/inline-syntax.rs:49:13
4141
|
4242
LL | .intel_syntax noprefix
4343
| ^^^^^^^^^^^^^^^^^^^^^^

src/test/ui/borrowck/two-phase-reservation-sharing-interference.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// revisions: nll_target
22

3-
// The following revisions are disabled due to missing support from two-phase beyond autorefs
3+
// The nll_beyond revision is disabled due to missing support from two-phase beyond autorefs
44
//[nll_beyond]compile-flags: -Z borrowck=mir -Z two-phase-beyond-autoref
5-
//[nll_beyond] should-fail
5+
//[nll_beyond]should-fail
66

77
//[nll_target]compile-flags: -Z borrowck=mir
88

src/test/ui/cmse-nonsecure/cmse-nonsecure-call/params-on-registers.rs

+11-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
11
// build-pass
22
// compile-flags: --target thumbv8m.main-none-eabi --crate-type lib
33
// needs-llvm-components: arm
4-
#![feature(abi_c_cmse_nonsecure_call)]
5-
#![no_std]
4+
#![feature(abi_c_cmse_nonsecure_call, no_core, lang_items, intrinsics)]
5+
#![no_core]
6+
#[lang="sized"]
7+
pub trait Sized { }
8+
#[lang="copy"]
9+
pub trait Copy { }
10+
11+
extern "rust-intrinsic" {
12+
pub fn transmute<T, U>(e: T) -> U;
13+
}
614

715
#[no_mangle]
816
pub fn test(a: u32, b: u32, c: u32, d: u32) -> u32 {
917
let non_secure_function = unsafe {
10-
core::mem::transmute::<usize, extern "C-cmse-nonsecure-call" fn(u32, u32, u32, u32) -> u32>(
18+
transmute::<usize, extern "C-cmse-nonsecure-call" fn(u32, u32, u32, u32) -> u32>(
1119
0x10000004,
1220
)
1321
};

src/test/ui/cmse-nonsecure/cmse-nonsecure-call/params-on-stack.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// build-fail
12
// compile-flags: --target thumbv8m.main-none-eabi --crate-type lib
23
// needs-llvm-components: arm
34
// min-llvm-version: 11.0
@@ -15,7 +16,7 @@ extern "rust-intrinsic" {
1516
#[no_mangle]
1617
pub fn test(a: u32, b: u32, c: u32, d: u32, e: u32) -> u32 {
1718
let non_secure_function = unsafe {
18-
core::mem::transmute::<
19+
transmute::<
1920
usize,
2021
extern "C-cmse-nonsecure-call" fn(u32, u32, u32, u32, u32) -> u32>
2122
(
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// compile-flags: --target thumbv8m.main-none-eabi --crate-type lib
22
// needs-llvm-components: arm
3-
#![feature(abi_c_cmse_nonsecure_call)]
4-
#![no_std]
3+
#![feature(abi_c_cmse_nonsecure_call, lang_items, no_core)]
4+
#![no_core]
5+
#[lang="sized"]
6+
trait Sized { }
57

68
pub extern "C-cmse-nonsecure-call" fn test() {} //~ ERROR [E0781]

src/test/ui/cmse-nonsecure/cmse-nonsecure-call/wrong-abi-location-1.stderr

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
error[E0781]: the `"cmse-nonsecure-call"` ABI is only allowed on function pointers.
2-
--> $DIR/wrong-abi-location-1.rs:6:1
1+
error[E0781]: the `"C-cmse-nonsecure-call"` ABI is only allowed on function pointers.
2+
--> $DIR/wrong-abi-location-1.rs:8:1
33
|
4-
LL | pub extern "C-cmse-nonsecure-call" fn test() {} //~ ERROR [E0781]
5-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4+
LL | pub extern "C-cmse-nonsecure-call" fn test() {}
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66

77
error: aborting due to previous error
88

src/test/ui/cmse-nonsecure/cmse-nonsecure-call/wrong-abi-location-2.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
// compile-flags: --target thumbv8m.main-none-eabi --crate-type lib
22
// needs-llvm-components: arm
3-
#![feature(abi_c_cmse_nonsecure_call)]
4-
#![no_std]
3+
#![feature(abi_c_cmse_nonsecure_call, lang_items, no_core)]
4+
#![no_core]
5+
#[lang="sized"]
6+
trait Sized { }
57

68
extern "C-cmse-nonsecure-call" { //~ ERROR [E0781]
79
fn test();

src/test/ui/cmse-nonsecure/cmse-nonsecure-call/wrong-abi-location-2.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
error[E0781]: the `"C-cmse-nonsecure-call"` ABI is only allowed on function pointers.
2-
--> $DIR/wrong-abi-location-2.rs:6:1
2+
--> $DIR/wrong-abi-location-2.rs:8:1
33
|
44
LL | / extern "C-cmse-nonsecure-call" {
5-
LL | | fn test(); //~ ERROR [E0781]
5+
LL | | fn test();
66
LL | | }
77
| |_^
88

Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
// build-pass
22
// compile-flags: --target thumbv8m.main-none-eabi --crate-type lib
33
// needs-llvm-components: arm
4-
#![feature(cmse_nonsecure_entry)]
5-
#![no_std]
4+
#![feature(cmse_nonsecure_entry, no_core, lang_items)]
5+
#![no_core]
6+
#[lang="sized"]
7+
trait Sized { }
8+
#[lang="copy"]
9+
trait Copy { }
610

711
#[no_mangle]
812
#[cmse_nonsecure_entry]
9-
pub extern "C" fn entry_function(a: u32, b: u32, c: u32, d: u32) -> u32 {
10-
a + b + c + d
13+
pub extern "C" fn entry_function(_: u32, _: u32, _: u32, d: u32) -> u32 {
14+
d
1115
}

src/test/ui/cmse-nonsecure/cmse-nonsecure-entry/params-on-stack.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// build-fail
12
// compile-flags: --target thumbv8m.main-none-eabi --crate-type lib
23
// needs-llvm-components: arm
34
// min-llvm-version: 11.0
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
// compile-flags: --target thumbv8m.main-none-eabi --crate-type lib
22
// needs-llvm-components: arm
3-
#![feature(cmse_nonsecure_entry)]
4-
#![no_std]
3+
#![feature(cmse_nonsecure_entry, no_core, lang_items)]
4+
#![no_core]
5+
#[lang="sized"]
6+
trait Sized { }
57

68
#[no_mangle]
79
#[cmse_nonsecure_entry]
8-
pub fn entry_function(a: u32, b: u32, c: u32, d: u32) -> u32 { //~ ERROR [E0776]
9-
a + b + c + d
10+
//~^ ERROR `#[cmse_nonsecure_entry]` requires C ABI [E0776]
11+
pub fn entry_function(_: u32, _: u32, _: u32, d: u32) -> u32 {
12+
d
1013
}

src/test/ui/cmse-nonsecure/cmse-nonsecure-entry/wrong-abi.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
error[E0776]: `#[cmse_nonsecure_entry]` functions require C ABI
2-
--> $DIR/wrong-abi.rs:7:1
1+
error[E0776]: `#[cmse_nonsecure_entry]` requires C ABI
2+
--> $DIR/wrong-abi.rs:9:1
33
|
44
LL | #[cmse_nonsecure_entry]
55
| ^^^^^^^^^^^^^^^^^^^^^^^

src/test/ui/crate-loading/missing-std.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0463]: can't find crate for `core`
2-
--> $DIR/missing-std.rs:5:1
2+
--> $DIR/missing-std.rs:6:1
33
|
44
LL | extern crate core;
55
| ^^^^^^^^^^^^^^^^^^ can't find crate

0 commit comments

Comments
 (0)