Skip to content

Commit 808e441

Browse files
committed
update crashes
1 parent 4871588 commit 808e441

File tree

2 files changed

+29
-4
lines changed

2 files changed

+29
-4
lines changed

tests/crashes/120016.rs renamed to tests/ui/type-alias-impl-trait/hidden-ty-mismatch-tainting-issue-120016.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
1-
//@ known-bug: #120016
2-
//@ compile-flags: -Zcrate-attr=feature(const_async_blocks) --edition=2021
1+
//@ compile-flags: --edition=2021
32

43
#![feature(type_alias_impl_trait, const_async_blocks)]
54

65
struct Bug {
76
V1: [(); {
87
type F = impl std::future::Future<Output = impl Sized>;
98
fn concrete_use() -> F {
10-
//~^ ERROR to be a future that resolves to `u8`, but it resolves to `()`
119
async {}
1210
}
1311
let f: F = async { 1 };
14-
//~^ ERROR `async` blocks are not allowed in constants
12+
//~^ ERROR concrete type differs from previous defining opaque type use
13+
//~| ERROR concrete type differs from previous defining opaque type use
1514
1
1615
}],
1716
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
error: concrete type differs from previous defining opaque type use
2+
--> $DIR/hidden-ty-mismatch-tainting-issue-120016.rs:11:20
3+
|
4+
LL | let f: F = async { 1 };
5+
| ^^^^^^^^^^^ expected `{async block@$DIR/hidden-ty-mismatch-tainting-issue-120016.rs:9:13: 9:18}`, got `{async block@$DIR/hidden-ty-mismatch-tainting-issue-120016.rs:11:20: 11:25}`
6+
|
7+
note: previous use here
8+
--> $DIR/hidden-ty-mismatch-tainting-issue-120016.rs:9:13
9+
|
10+
LL | async {}
11+
| ^^^^^^^^
12+
13+
error: concrete type differs from previous defining opaque type use
14+
--> $DIR/hidden-ty-mismatch-tainting-issue-120016.rs:11:20
15+
|
16+
LL | let f: F = async { 1 };
17+
| ^^^^^^^^^^^ expected `()`, got `i32`
18+
|
19+
note: previous use here
20+
--> $DIR/hidden-ty-mismatch-tainting-issue-120016.rs:9:13
21+
|
22+
LL | async {}
23+
| ^^^^^^^^
24+
25+
error: aborting due to 2 previous errors
26+

0 commit comments

Comments
 (0)