diff options
Diffstat (limited to 'tests/ui/impl-trait/type-alias-impl-trait-in-fn-body.rs')
-rw-r--r-- | tests/ui/impl-trait/type-alias-impl-trait-in-fn-body.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/ui/impl-trait/type-alias-impl-trait-in-fn-body.rs b/tests/ui/impl-trait/type-alias-impl-trait-in-fn-body.rs new file mode 100644 index 000000000..91be4efd5 --- /dev/null +++ b/tests/ui/impl-trait/type-alias-impl-trait-in-fn-body.rs @@ -0,0 +1,12 @@ +// build-pass (FIXME(62277): could be check-pass?) + +#![feature(type_alias_impl_trait)] + +use std::fmt::Debug; + +fn main() { + type Existential = impl Debug; + + fn f() -> Existential {} + println!("{:?}", f()); +} |