diff options
Diffstat (limited to 'tests/ui/impl-trait/issues/issue-78722.rs')
-rw-r--r-- | tests/ui/impl-trait/issues/issue-78722.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/ui/impl-trait/issues/issue-78722.rs b/tests/ui/impl-trait/issues/issue-78722.rs new file mode 100644 index 000000000..78233f300 --- /dev/null +++ b/tests/ui/impl-trait/issues/issue-78722.rs @@ -0,0 +1,20 @@ +// 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() {} |