Skip to content

Commit caa7c99

Browse files
Bless unrelated tests with new help message
1 parent 1122404 commit caa7c99

File tree

8 files changed

+48
-17
lines changed

8 files changed

+48
-17
lines changed

src/test/ui/closures/issue-52437.stderr

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,14 @@ error: invalid label name `'static`
44
LL | [(); &(&'static: loop { |x| {}; }) as *const _ as usize]
55
| ^^^^^^^
66

7-
error[E0744]: `loop` is not allowed in a `const`
7+
error[E0658]: `loop` is not allowed in a `const`
88
--> $DIR/issue-52437.rs:2:13
99
|
1010
LL | [(); &(&'static: loop { |x| {}; }) as *const _ as usize]
1111
| ^^^^^^^^^^^^^^^^^^^^^^^^^
12+
|
13+
= note: for more information, see https://github.com/rust-lang/rust/issues/52000
14+
= help: add `#![feature(const_loop)]` to the crate attributes to enable
1215

1316
error[E0282]: type annotations needed
1417
--> $DIR/issue-52437.rs:2:30
@@ -18,5 +21,5 @@ LL | [(); &(&'static: loop { |x| {}; }) as *const _ as usize]
1821

1922
error: aborting due to 3 previous errors
2023

21-
Some errors have detailed explanations: E0282, E0744.
24+
Some errors have detailed explanations: E0282, E0658.
2225
For more information about an error, try `rustc --explain E0282`.

src/test/ui/consts/const-eval/infinite_loop.stderr

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0744]: `while` is not allowed in a `const`
1+
error[E0658]: `while` is not allowed in a `const`
22
--> $DIR/infinite_loop.rs:7:9
33
|
44
LL | / while n != 0 {
@@ -8,6 +8,10 @@ LL | |
88
LL | |
99
LL | | }
1010
| |_________^
11+
|
12+
= note: for more information, see https://github.com/rust-lang/rust/issues/52000
13+
= help: add `#![feature(const_loop)]` to the crate attributes to enable
14+
= help: add `#![feature(const_if_match)]` to the crate attributes to enable
1115

1216
error[E0658]: `if` is not allowed in a `const`
1317
--> $DIR/infinite_loop.rs:9:17
@@ -39,5 +43,5 @@ LL | n = if n % 2 == 0 { n/2 } else { 3*n + 1 };
3943

4044
error: aborting due to 3 previous errors
4145

42-
Some errors have detailed explanations: E0080, E0658, E0744.
46+
Some errors have detailed explanations: E0080, E0658.
4347
For more information about an error, try `rustc --explain E0080`.

src/test/ui/consts/const-eval/issue-52442.stderr

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
error[E0744]: `loop` is not allowed in a `const`
1+
error[E0658]: `loop` is not allowed in a `const`
22
--> $DIR/issue-52442.rs:2:14
33
|
44
LL | [(); { &loop { break } as *const _ as usize } ];
55
| ^^^^^^^^^^^^^^
6+
|
7+
= note: for more information, see https://github.com/rust-lang/rust/issues/52000
8+
= help: add `#![feature(const_loop)]` to the crate attributes to enable
69

710
error[E0658]: casting pointers to integers in constants is unstable
811
--> $DIR/issue-52442.rs:2:13
@@ -21,5 +24,5 @@ LL | [(); { &loop { break } as *const _ as usize } ];
2124

2225
error: aborting due to 3 previous errors
2326

24-
Some errors have detailed explanations: E0080, E0658, E0744.
27+
Some errors have detailed explanations: E0080, E0658.
2528
For more information about an error, try `rustc --explain E0080`.

src/test/ui/consts/const-eval/issue-52475.stderr

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0744]: `while` is not allowed in a `const`
1+
error[E0658]: `while` is not allowed in a `const`
22
--> $DIR/issue-52475.rs:6:9
33
|
44
LL | / while n < 5 {
@@ -7,6 +7,10 @@ LL | | n = (n + 1) % 5;
77
LL | | x = &0; // Materialize a new AllocId
88
LL | | }
99
| |_________^
10+
|
11+
= note: for more information, see https://github.com/rust-lang/rust/issues/52000
12+
= help: add `#![feature(const_loop)]` to the crate attributes to enable
13+
= help: add `#![feature(const_if_match)]` to the crate attributes to enable
1014

1115
warning: Constant evaluating a complex constant, this might take some time
1216
--> $DIR/issue-52475.rs:2:18
@@ -29,5 +33,5 @@ LL | n = (n + 1) % 5;
2933

3034
error: aborting due to 2 previous errors
3135

32-
Some errors have detailed explanations: E0080, E0744.
36+
Some errors have detailed explanations: E0080, E0658.
3337
For more information about an error, try `rustc --explain E0080`.
Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,21 @@
1-
error[E0744]: `loop` is not allowed in a `const`
1+
error[E0658]: `loop` is not allowed in a `const`
22
--> $DIR/issue-62272.rs:7:17
33
|
44
LL | const FOO: () = loop { break; };
55
| ^^^^^^^^^^^^^^^
6+
|
7+
= note: for more information, see https://github.com/rust-lang/rust/issues/52000
8+
= help: add `#![feature(const_loop)]` to the crate attributes to enable
69

7-
error[E0744]: `loop` is not allowed in a `const`
10+
error[E0658]: `loop` is not allowed in a `const`
811
--> $DIR/issue-62272.rs:10:20
912
|
1013
LL | [FOO; { let x; loop { x = 5; break; } x }];
1114
| ^^^^^^^^^^^^^^^^^^^^^^
15+
|
16+
= note: for more information, see https://github.com/rust-lang/rust/issues/52000
17+
= help: add `#![feature(const_loop)]` to the crate attributes to enable
1218

1319
error: aborting due to 2 previous errors
1420

15-
For more information about this error, try `rustc --explain E0744`.
21+
For more information about this error, try `rustc --explain E0658`.
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1-
error[E0744]: `while` is not allowed in a `const`
1+
error[E0658]: `while` is not allowed in a `const`
22
--> $DIR/const-labeled-break.rs:10:19
33
|
44
LL | const CRASH: () = 'a: while break 'a {};
55
| ^^^^^^^^^^^^^^^^^^^^^
6+
|
7+
= note: for more information, see https://github.com/rust-lang/rust/issues/52000
8+
= help: add `#![feature(const_loop)]` to the crate attributes to enable
9+
= help: add `#![feature(const_if_match)]` to the crate attributes to enable
610

711
error: aborting due to previous error
812

9-
For more information about this error, try `rustc --explain E0744`.
13+
For more information about this error, try `rustc --explain E0658`.
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1-
error[E0744]: `loop` is not allowed in a `const fn`
1+
error[E0658]: `loop` is not allowed in a `const fn`
22
--> $DIR/loop_ice.rs:2:5
33
|
44
LL | loop {}
55
| ^^^^^^^
6+
|
7+
= note: for more information, see https://github.com/rust-lang/rust/issues/52000
8+
= help: add `#![feature(const_loop)]` to the crate attributes to enable
69

710
error: aborting due to previous error
811

9-
For more information about this error, try `rustc --explain E0744`.
12+
For more information about this error, try `rustc --explain E0658`.

src/test/ui/issues/issue-51714.stderr

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1-
error[E0744]: `while` is not allowed in a `const`
1+
error[E0658]: `while` is not allowed in a `const`
22
--> $DIR/issue-51714.rs:11:17
33
|
44
LL | [(); return while let Some(n) = Some(0) {}];
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6+
|
7+
= note: for more information, see https://github.com/rust-lang/rust/issues/52000
8+
= help: add `#![feature(const_loop)]` to the crate attributes to enable
9+
= help: add `#![feature(const_if_match)]` to the crate attributes to enable
610

711
error[E0572]: return statement outside of function body
812
--> $DIR/issue-51714.rs:2:14
@@ -30,5 +34,5 @@ LL | [(); return while let Some(n) = Some(0) {}];
3034

3135
error: aborting due to 5 previous errors
3236

33-
Some errors have detailed explanations: E0572, E0744.
37+
Some errors have detailed explanations: E0572, E0658.
3438
For more information about an error, try `rustc --explain E0572`.

0 commit comments

Comments
 (0)