9f03cfc207
This was previously needed because the indirection used to hide some unexplained lifetime errors, which it turned out were related to the `min_choice` algorithm. Removing the indirection also solves a couple of cycle errors, large moves and makes async blocks support the `#[track_caller]` annotation.
20 lines
409 B
Rust
20 lines
409 B
Rust
// edition:2018
|
|
|
|
#![feature(type_alias_impl_trait)]
|
|
|
|
type F = impl core::future::Future<Output = u8>;
|
|
|
|
struct Bug {
|
|
V1: [(); {
|
|
fn concrete_use() -> F {
|
|
//~^ ERROR to be a future that resolves to `u8`, but it resolves to `()`
|
|
async {}
|
|
}
|
|
let f: F = async { 1 };
|
|
//~^ ERROR `async` blocks are not allowed in constants
|
|
1
|
|
}],
|
|
}
|
|
|
|
fn main() {}
|