Skip to content

Commit 51ba7b4

Browse files
Use separate files instead of revisions
1 parent 2f5334d commit 51ba7b4

File tree

4 files changed

+37
-24
lines changed

4 files changed

+37
-24
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// incremental
2+
// edition:2021
3+
// compile-flags: -Zdrop-tracking
4+
5+
fn main() {
6+
let _ = async {
7+
let s = std::array::from_fn(|_| ()).await;
8+
//~^ ERROR `[(); _]` is not a future
9+
//~| ERROR type inside `async` block must be known in this context
10+
//~| ERROR type inside `async` block must be known in this context
11+
//~| ERROR type inside `async` block must be known in this context
12+
//~| ERROR type inside `async` block must be known in this context
13+
//~| ERROR type inside `async` block must be known in this context
14+
};
15+
}

src/test/ui/generator/unresolved-ct-var.stock.stderr renamed to src/test/ui/generator/unresolved-ct-var-drop-tracking.stderr

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0277]: `[(); _]` is not a future
2-
--> $DIR/unresolved-ct-var.rs:8:44
2+
--> $DIR/unresolved-ct-var-drop-tracking.rs:7:44
33
|
44
LL | let s = std::array::from_fn(|_| ()).await;
55
| ---------------------------^^^^^^
@@ -13,61 +13,61 @@ LL | let s = std::array::from_fn(|_| ()).await;
1313
= note: required for `[(); _]` to implement `IntoFuture`
1414

1515
error[E0698]: type inside `async` block must be known in this context
16-
--> $DIR/unresolved-ct-var.rs:8:17
16+
--> $DIR/unresolved-ct-var-drop-tracking.rs:7:17
1717
|
1818
LL | let s = std::array::from_fn(|_| ()).await;
1919
| ^^^^^^^^^^^^^^^^^^^ cannot infer the value of const parameter `N` declared on the function `from_fn`
2020
|
2121
note: the type is part of the `async` block because of this `await`
22-
--> $DIR/unresolved-ct-var.rs:8:44
22+
--> $DIR/unresolved-ct-var-drop-tracking.rs:7:44
2323
|
2424
LL | let s = std::array::from_fn(|_| ()).await;
2525
| ^^^^^^
2626

2727
error[E0698]: type inside `async` block must be known in this context
28-
--> $DIR/unresolved-ct-var.rs:8:17
28+
--> $DIR/unresolved-ct-var-drop-tracking.rs:7:17
2929
|
3030
LL | let s = std::array::from_fn(|_| ()).await;
3131
| ^^^^^^^^^^^^^^^^^^^ cannot infer the value of const parameter `N` declared on the function `from_fn`
3232
|
3333
note: the type is part of the `async` block because of this `await`
34-
--> $DIR/unresolved-ct-var.rs:8:44
34+
--> $DIR/unresolved-ct-var-drop-tracking.rs:7:44
3535
|
3636
LL | let s = std::array::from_fn(|_| ()).await;
3737
| ^^^^^^
3838

3939
error[E0698]: type inside `async` block must be known in this context
40-
--> $DIR/unresolved-ct-var.rs:8:17
40+
--> $DIR/unresolved-ct-var-drop-tracking.rs:7:17
4141
|
4242
LL | let s = std::array::from_fn(|_| ()).await;
4343
| ^^^^^^^^^^^^^^^^^^^ cannot infer the value of const parameter `N` declared on the function `from_fn`
4444
|
4545
note: the type is part of the `async` block because of this `await`
46-
--> $DIR/unresolved-ct-var.rs:8:44
46+
--> $DIR/unresolved-ct-var-drop-tracking.rs:7:44
4747
|
4848
LL | let s = std::array::from_fn(|_| ()).await;
4949
| ^^^^^^
5050

5151
error[E0698]: type inside `async` block must be known in this context
52-
--> $DIR/unresolved-ct-var.rs:8:17
52+
--> $DIR/unresolved-ct-var-drop-tracking.rs:7:17
5353
|
5454
LL | let s = std::array::from_fn(|_| ()).await;
5555
| ^^^^^^^^^^^^^^^^^^^ cannot infer the value of const parameter `N` declared on the function `from_fn`
5656
|
5757
note: the type is part of the `async` block because of this `await`
58-
--> $DIR/unresolved-ct-var.rs:8:44
58+
--> $DIR/unresolved-ct-var-drop-tracking.rs:7:44
5959
|
6060
LL | let s = std::array::from_fn(|_| ()).await;
6161
| ^^^^^^
6262

6363
error[E0698]: type inside `async` block must be known in this context
64-
--> $DIR/unresolved-ct-var.rs:8:17
64+
--> $DIR/unresolved-ct-var-drop-tracking.rs:7:17
6565
|
6666
LL | let s = std::array::from_fn(|_| ()).await;
6767
| ^^^^^^^^^^^^^^^^^^^ cannot infer the value of const parameter `N` declared on the function `from_fn`
6868
|
6969
note: the type is part of the `async` block because of this `await`
70-
--> $DIR/unresolved-ct-var.rs:8:44
70+
--> $DIR/unresolved-ct-var-drop-tracking.rs:7:44
7171
|
7272
LL | let s = std::array::from_fn(|_| ()).await;
7373
| ^^^^^^

src/test/ui/generator/unresolved-ct-var.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
// incremental
22
// edition:2021
3-
// revisions: drop_tracking stock
4-
//[drop_tracking] compile-flags: -Zdrop-tracking
53

64
fn main() {
75
let _ = async {

src/test/ui/generator/unresolved-ct-var.drop_tracking.stderr renamed to src/test/ui/generator/unresolved-ct-var.stderr

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0277]: `[(); _]` is not a future
2-
--> $DIR/unresolved-ct-var.rs:8:44
2+
--> $DIR/unresolved-ct-var.rs:6:44
33
|
44
LL | let s = std::array::from_fn(|_| ()).await;
55
| ---------------------------^^^^^^
@@ -13,61 +13,61 @@ LL | let s = std::array::from_fn(|_| ()).await;
1313
= note: required for `[(); _]` to implement `IntoFuture`
1414

1515
error[E0698]: type inside `async` block must be known in this context
16-
--> $DIR/unresolved-ct-var.rs:8:17
16+
--> $DIR/unresolved-ct-var.rs:6:17
1717
|
1818
LL | let s = std::array::from_fn(|_| ()).await;
1919
| ^^^^^^^^^^^^^^^^^^^ cannot infer the value of const parameter `N` declared on the function `from_fn`
2020
|
2121
note: the type is part of the `async` block because of this `await`
22-
--> $DIR/unresolved-ct-var.rs:8:44
22+
--> $DIR/unresolved-ct-var.rs:6:44
2323
|
2424
LL | let s = std::array::from_fn(|_| ()).await;
2525
| ^^^^^^
2626

2727
error[E0698]: type inside `async` block must be known in this context
28-
--> $DIR/unresolved-ct-var.rs:8:17
28+
--> $DIR/unresolved-ct-var.rs:6:17
2929
|
3030
LL | let s = std::array::from_fn(|_| ()).await;
3131
| ^^^^^^^^^^^^^^^^^^^ cannot infer the value of const parameter `N` declared on the function `from_fn`
3232
|
3333
note: the type is part of the `async` block because of this `await`
34-
--> $DIR/unresolved-ct-var.rs:8:44
34+
--> $DIR/unresolved-ct-var.rs:6:44
3535
|
3636
LL | let s = std::array::from_fn(|_| ()).await;
3737
| ^^^^^^
3838

3939
error[E0698]: type inside `async` block must be known in this context
40-
--> $DIR/unresolved-ct-var.rs:8:17
40+
--> $DIR/unresolved-ct-var.rs:6:17
4141
|
4242
LL | let s = std::array::from_fn(|_| ()).await;
4343
| ^^^^^^^^^^^^^^^^^^^ cannot infer the value of const parameter `N` declared on the function `from_fn`
4444
|
4545
note: the type is part of the `async` block because of this `await`
46-
--> $DIR/unresolved-ct-var.rs:8:44
46+
--> $DIR/unresolved-ct-var.rs:6:44
4747
|
4848
LL | let s = std::array::from_fn(|_| ()).await;
4949
| ^^^^^^
5050

5151
error[E0698]: type inside `async` block must be known in this context
52-
--> $DIR/unresolved-ct-var.rs:8:17
52+
--> $DIR/unresolved-ct-var.rs:6:17
5353
|
5454
LL | let s = std::array::from_fn(|_| ()).await;
5555
| ^^^^^^^^^^^^^^^^^^^ cannot infer the value of const parameter `N` declared on the function `from_fn`
5656
|
5757
note: the type is part of the `async` block because of this `await`
58-
--> $DIR/unresolved-ct-var.rs:8:44
58+
--> $DIR/unresolved-ct-var.rs:6:44
5959
|
6060
LL | let s = std::array::from_fn(|_| ()).await;
6161
| ^^^^^^
6262

6363
error[E0698]: type inside `async` block must be known in this context
64-
--> $DIR/unresolved-ct-var.rs:8:17
64+
--> $DIR/unresolved-ct-var.rs:6:17
6565
|
6666
LL | let s = std::array::from_fn(|_| ()).await;
6767
| ^^^^^^^^^^^^^^^^^^^ cannot infer the value of const parameter `N` declared on the function `from_fn`
6868
|
6969
note: the type is part of the `async` block because of this `await`
70-
--> $DIR/unresolved-ct-var.rs:8:44
70+
--> $DIR/unresolved-ct-var.rs:6:44
7171
|
7272
LL | let s = std::array::from_fn(|_| ()).await;
7373
| ^^^^^^

0 commit comments

Comments
 (0)