Skip to content

Commit a1d8ce4

Browse files
committed
chalk: add known-bug test that was previously ICEing.
1 parent b8bd997 commit a1d8ce4

File tree

3 files changed

+50
-2
lines changed

3 files changed

+50
-2
lines changed

src/test/ui/chalkify/bugs/async.rs

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// check-fail
2+
// known-bug
3+
// compile-flags: -Z chalk --edition=2021
4+
5+
fn main() -> () {}
6+
7+
async fn foo(x: u32) -> u32 {
8+
x
9+
}
+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
error[E0277]: the trait bound `[static generator@$DIR/async.rs:7:29: 9:2]: Generator<ResumeTy>` is not satisfied
2+
--> $DIR/async.rs:7:29
3+
|
4+
LL | async fn foo(x: u32) -> u32 {
5+
| _____________________________^
6+
LL | | x
7+
LL | | }
8+
| |_^ the trait `Generator<ResumeTy>` is not implemented for `[static generator@$DIR/async.rs:7:29: 9:2]`
9+
|
10+
note: required by a bound in `from_generator`
11+
--> $SRC_DIR/core/src/future/mod.rs:LL:COL
12+
|
13+
LL | T: Generator<ResumeTy, Yield = ()>,
14+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `from_generator`
15+
16+
error[E0280]: the requirement `<[static generator@$DIR/async.rs:7:29: 9:2] as Generator<ResumeTy>>::Yield == ()` is not satisfied
17+
--> $DIR/async.rs:7:29
18+
|
19+
LL | async fn foo(x: u32) -> u32 {
20+
| _____________________________^
21+
LL | | x
22+
LL | | }
23+
| |_^
24+
|
25+
note: required by a bound in `from_generator`
26+
--> $SRC_DIR/core/src/future/mod.rs:LL:COL
27+
|
28+
LL | T: Generator<ResumeTy, Yield = ()>,
29+
| ^^^^^^^^^^ required by this bound in `from_generator`
30+
31+
error[E0280]: the requirement `<impl Future<Output = [async output]> as Future>::Output == u32` is not satisfied
32+
--> $DIR/async.rs:7:25
33+
|
34+
LL | async fn foo(x: u32) -> u32 {
35+
| ^^^
36+
37+
error: aborting due to 3 previous errors
38+
39+
For more information about this error, try `rustc --explain E0277`.

src/tools/tidy/src/error_codes_check.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ use regex::Regex;
1010

1111
// A few of those error codes can't be tested but all the others can and *should* be tested!
1212
const EXEMPTED_FROM_TEST: &[&str] = &[
13-
"E0279", "E0280", "E0313", "E0377", "E0461", "E0462", "E0465", "E0476", "E0514", "E0519",
14-
"E0523", "E0554", "E0640", "E0717", "E0729",
13+
"E0279", "E0313", "E0377", "E0461", "E0462", "E0465", "E0476", "E0514", "E0519", "E0523",
14+
"E0554", "E0640", "E0717", "E0729",
1515
];
1616

1717
// Some error codes don't have any tests apparently...

0 commit comments

Comments
 (0)