Skip to content

Commit 56cda64

Browse files
committed
Update tests
1 parent f24b0a5 commit 56cda64

File tree

6 files changed

+19
-19
lines changed

6 files changed

+19
-19
lines changed

tests/codegen-llvm/cf-protection.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
// Test that the correct module flags are emitted with different control-flow protection flags.
22

33
//@ add-core-stubs
4-
//@ revisions: undefined none branch return full
4+
//@ revisions: undefined none branch return_ full
55
//@ needs-llvm-components: x86
66
// [undefined] no extra compile-flags
77
//@ [none] compile-flags: -Z cf-protection=none
88
//@ [branch] compile-flags: -Z cf-protection=branch
9-
//@ [return] compile-flags: -Z cf-protection=return
9+
//@ [return_] compile-flags: -Z cf-protection=return
1010
//@ [full] compile-flags: -Z cf-protection=full
1111
//@ compile-flags: --target x86_64-unknown-linux-gnu
1212

@@ -30,9 +30,9 @@ pub fn test() {}
3030
// branch: !"cf-protection-branch", i32 1
3131
// branch-NOT: !"cf-protection-return"
3232

33-
// return-NOT: !"cf-protection-branch"
34-
// return: !"cf-protection-return", i32 1
35-
// return-NOT: !"cf-protection-branch"
33+
// return_-NOT: !"cf-protection-branch"
34+
// return_: !"cf-protection-return", i32 1
35+
// return_-NOT: !"cf-protection-branch"
3636

3737
// full: !"cf-protection-branch", i32 1
3838
// full: !"cf-protection-return", i32 1

tests/ui/cfg/cmdline-false.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/// Test that `--cfg false` doesn't cause `cfg(false)` to evaluate to `true`
2-
//@ compile-flags: --cfg false
2+
//@ compile-flags: --cfg r#false
33

44
#[cfg(false)]
55
fn foo() {}

tests/ui/cfg/raw-true-false.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
//@ check-pass
2-
//@ revisions: r0x0 r0x1 r1x0 r1x1
3-
//@[r0x0] compile-flags: --cfg false --check-cfg=cfg(false)
4-
//@[r0x1] compile-flags: --cfg false --check-cfg=cfg(r#false)
5-
//@[r1x0] compile-flags: --cfg r#false --check-cfg=cfg(false)
6-
//@[r1x1] compile-flags: --cfg r#false --check-cfg=cfg(r#false)
2+
//@ compile-flags: --cfg r#false --check-cfg=cfg(r#false)
73
#![deny(unexpected_cfgs)]
84
fn main() {
95
#[cfg(not(r#false))]

tests/ui/check-cfg/raw-keywords.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
//
44
//@ check-pass
55
//@ no-auto-check-cfg
6-
//@ compile-flags: --cfg=true --cfg=async --check-cfg=cfg(r#true,r#async,edition2015,edition2021)
6+
//@ compile-flags: --cfg=r#true --cfg=r#async --check-cfg=cfg(r#true,r#async,edition2015,edition2021)
77
//
88
//@ revisions: edition2015 edition2021
99
//@ [edition2015] edition: 2015

tests/ui/explicit-tail-calls/ctfe-id-unlimited.return.stderr renamed to tests/ui/explicit-tail-calls/ctfe-id-unlimited.return_.stderr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
error[E0080]: reached the configured maximum number of stack frames
2-
--> $DIR/ctfe-id-unlimited.rs:28:20
2+
--> $DIR/ctfe-id-unlimited.rs:32:20
33
|
44
LL | const ID_ED: u32 = rec_id(ORIGINAL);
55
| ^^^^^^^^^^^^^^^^ evaluation of `ID_ED` failed inside this call
66
|
77
note: inside `rec_id`
8-
--> $DIR/ctfe-id-unlimited.rs:21:5
8+
--> $DIR/ctfe-id-unlimited.rs:25:5
99
|
1010
LL | inner(0, n)
1111
| ^^^^^^^^^^^
1212
note: [... 125 additional calls inside `inner` ...]
13-
--> $DIR/ctfe-id-unlimited.rs:17:42
13+
--> $DIR/ctfe-id-unlimited.rs:21:42
1414
|
1515
LL | #[cfg(r#return)] _ => return inner(acc + 1, n - 1),
1616
| ^^^^^^^^^^^^^^^^^^^^^
1717
note: inside `inner`
18-
--> $DIR/ctfe-id-unlimited.rs:17:42
18+
--> $DIR/ctfe-id-unlimited.rs:21:42
1919
|
2020
LL | #[cfg(r#return)] _ => return inner(acc + 1, n - 1),
2121
| ^^^^^^^^^^^^^^^^^^^^^ the failure occurred here

tests/ui/explicit-tail-calls/ctfe-id-unlimited.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1-
//@ revisions: become return
2-
//@ [become] run-pass
1+
//@ revisions: become_ return_
2+
//@ [become_] run-pass
3+
//@ [become_] compile-flags: --cfg r#become
4+
//@ [return_] compile-flags: --cfg r#return
5+
6+
#![allow(unexpected_cfgs)]
37
#![expect(incomplete_features)]
48
#![feature(explicit_tail_calls)]
59

@@ -25,7 +29,7 @@ const fn rec_id(n: u32) -> u32 {
2529
const ORIGINAL: u32 = 12345;
2630
// Original number, but with identity function applied
2731
// (this is the same, but requires execution of the recursion)
28-
const ID_ED: u32 = rec_id(ORIGINAL); //[return]~ ERROR: reached the configured maximum number of stack frames
32+
const ID_ED: u32 = rec_id(ORIGINAL); //[return_]~ ERROR: reached the configured maximum number of stack frames
2933
// Assert to make absolutely sure the computation actually happens
3034
const ASSERT: () = assert!(ORIGINAL == ID_ED);
3135

0 commit comments

Comments
 (0)