Skip to content

Commit c27d6f5

Browse files
committed
Fix unresolved_type_param test
1 parent 9ecd82d commit c27d6f5

File tree

2 files changed

+33
-1
lines changed

2 files changed

+33
-1
lines changed

src/test/ui/async-await/unresolved_type_param.rs

+8
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,20 @@ async fn foo() {
1010
//~^ ERROR type inside `async fn` body must be known in this context
1111
//~| ERROR type inside `async fn` body must be known in this context
1212
//~| ERROR type inside `async fn` body must be known in this context
13+
//~| ERROR type inside `async fn` body must be known in this context
14+
//~| ERROR type inside `async fn` body must be known in this context
15+
//~| NOTE cannot infer type for type parameter `T`
16+
//~| NOTE cannot infer type for type parameter `T`
1317
//~| NOTE cannot infer type for type parameter `T`
1418
//~| NOTE cannot infer type for type parameter `T`
1519
//~| NOTE cannot infer type for type parameter `T`
1620
//~| NOTE the type is part of the `async fn` body because of this `await`
1721
//~| NOTE the type is part of the `async fn` body because of this `await`
1822
//~| NOTE the type is part of the `async fn` body because of this `await`
23+
//~| NOTE the type is part of the `async fn` body because of this `await`
24+
//~| NOTE the type is part of the `async fn` body because of this `await`
25+
//~| NOTE in this expansion of desugaring of `await`
26+
//~| NOTE in this expansion of desugaring of `await`
1927
//~| NOTE in this expansion of desugaring of `await`
2028
//~| NOTE in this expansion of desugaring of `await`
2129
//~| NOTE in this expansion of desugaring of `await`

src/test/ui/async-await/unresolved_type_param.stderr

+25-1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,30 @@ note: the type is part of the `async fn` body because of this `await`
3434
LL | bar().await;
3535
| ^^^^^^^^^^^
3636

37-
error: aborting due to 3 previous errors
37+
error[E0698]: type inside `async fn` body must be known in this context
38+
--> $DIR/unresolved_type_param.rs:9:5
39+
|
40+
LL | bar().await;
41+
| ^^^ cannot infer type for type parameter `T` declared on the function `bar`
42+
|
43+
note: the type is part of the `async fn` body because of this `await`
44+
--> $DIR/unresolved_type_param.rs:9:5
45+
|
46+
LL | bar().await;
47+
| ^^^^^^^^^^^
48+
49+
error[E0698]: type inside `async fn` body must be known in this context
50+
--> $DIR/unresolved_type_param.rs:9:5
51+
|
52+
LL | bar().await;
53+
| ^^^ cannot infer type for type parameter `T` declared on the function `bar`
54+
|
55+
note: the type is part of the `async fn` body because of this `await`
56+
--> $DIR/unresolved_type_param.rs:9:5
57+
|
58+
LL | bar().await;
59+
| ^^^^^^^^^^^
60+
61+
error: aborting due to 5 previous errors
3862

3963
For more information about this error, try `rustc --explain E0698`.

0 commit comments

Comments
 (0)