2020-11-16 15:37:56 +00:00
|
|
|
// edition:2018
|
|
|
|
|
2021-07-26 20:01:16 +00:00
|
|
|
#![feature(type_alias_impl_trait)]
|
2020-11-16 15:37:56 +00:00
|
|
|
|
|
|
|
type F = impl core::future::Future<Output = u8>;
|
|
|
|
|
|
|
|
struct Bug {
|
|
|
|
V1: [(); {
|
|
|
|
fn concrete_use() -> F {
|
2022-11-25 08:53:58 +00:00
|
|
|
//~^ ERROR to be a future that resolves to `u8`, but it resolves to `()`
|
2022-05-27 19:31:10 +00:00
|
|
|
async {}
|
2020-11-16 15:37:56 +00:00
|
|
|
}
|
|
|
|
let f: F = async { 1 };
|
2022-02-14 16:10:22 +00:00
|
|
|
//~^ ERROR `async` blocks are not allowed in constants
|
2022-09-23 14:22:36 +00:00
|
|
|
//~| ERROR destructor of
|
2020-11-16 15:37:56 +00:00
|
|
|
1
|
|
|
|
}],
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|