mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 06:51:58 +00:00
21 lines
442 B
Rust
21 lines
442 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
|
|
//~| ERROR destructor of
|
|
1
|
|
}],
|
|
}
|
|
|
|
fn main() {}
|