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-08-07 19:13:41 -05:00
|
|
|
//~^ ERROR expected `impl Future<Output = ()>` 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
|
|
|
|
//~| ERROR destructors cannot be evaluated at compile-time
|
2020-11-16 09:37:56 -06:00
|
|
|
1
|
|
|
|
}],
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|