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