Skip to content

Commit 8cffc8c

Browse files
committed
Update tests
1 parent 4237b81 commit 8cffc8c

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

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)