Skip to content

Commit 9c2ed4c

Browse files
committed
Update tests
1 parent 2cefdb1 commit 9c2ed4c

File tree

13 files changed

+34
-111
lines changed

13 files changed

+34
-111
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

tests/ui/lifetimes/raw/raw-lt-invalid-raw-id.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,5 @@ macro_rules! w {
88

99
w!('r#_);
1010
//~^ ERROR `_` cannot be a raw lifetime
11-
w!('r#self);
12-
//~^ ERROR `self` cannot be a raw lifetime
13-
w!('r#super);
14-
//~^ ERROR `super` cannot be a raw lifetime
15-
w!('r#Self);
16-
//~^ ERROR `Self` cannot be a raw lifetime
17-
w!('r#crate);
18-
//~^ ERROR `crate` cannot be a raw lifetime
1911

2012
fn main() {}

tests/ui/lifetimes/raw/raw-lt-invalid-raw-id.stderr

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,5 @@ error: `_` cannot be a raw lifetime
44
LL | w!('r#_);
55
| ^^^^
66

7-
error: `self` cannot be a raw lifetime
8-
--> $DIR/raw-lt-invalid-raw-id.rs:11:4
9-
|
10-
LL | w!('r#self);
11-
| ^^^^^^^
12-
13-
error: `super` cannot be a raw lifetime
14-
--> $DIR/raw-lt-invalid-raw-id.rs:13:4
15-
|
16-
LL | w!('r#super);
17-
| ^^^^^^^^
18-
19-
error: `Self` cannot be a raw lifetime
20-
--> $DIR/raw-lt-invalid-raw-id.rs:15:4
21-
|
22-
LL | w!('r#Self);
23-
| ^^^^^^^
24-
25-
error: `crate` cannot be a raw lifetime
26-
--> $DIR/raw-lt-invalid-raw-id.rs:17:4
27-
|
28-
LL | w!('r#crate);
29-
| ^^^^^^^^
30-
31-
error: aborting due to 5 previous errors
7+
error: aborting due to 1 previous error
328

tests/ui/lint/non-snake-case/lint-non-snake-case-identifiers-suggestion-reserved.stderr

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,13 @@ error: variable `Super` should have a snake case name
6262
--> $DIR/lint-non-snake-case-identifiers-suggestion-reserved.rs:16:9
6363
|
6464
LL | let Super: usize = 0;
65-
| ^^^^^ help: rename the identifier
65+
| ^^^^^
66+
|
67+
help: rename the identifier or convert it to a snake case raw identifier (notice the capitalization)
68+
|
69+
LL - let Super: usize = 0;
70+
LL + let super: usize = 0;
6671
|
67-
= note: `super` cannot be used as a raw identifier
6872

6973
error: aborting due to 4 previous errors; 2 warnings emitted
7074

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1+
//@ check-pass
2+
13
fn main() {
24
let r#self: ();
3-
//~^ ERROR `self` cannot be a raw identifier
45
}

tests/ui/parser/raw/raw-literal-self.stderr

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)