Files
rust/src/test/ui/impl-trait/issues/issue-78722.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

21 lines
511 B
Rust
Raw Normal View History

// edition:2018
#![feature(type_alias_impl_trait)]
type F = impl core::future::Future<Output = u8>;
struct Bug {
V1: [(); {
fn concrete_use() -> F {
//~^ ERROR expected `impl Future<Output = ()>` to be a future that yields `u8`, but it actually yields `()`
async {}
}
let f: F = async { 1 };
//~^ ERROR `async` blocks are not allowed in constants
//~| ERROR destructors cannot be evaluated at compile-time
1
}],
}
fn main() {}