From eb16ae723dd3849e23192792889144488c70b584 Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Fri, 20 Aug 2021 17:33:21 -0300 Subject: [PATCH] Use of impl trait in an impl as the valoe for an associated type in a dyn --- .../type-alias-impl-trait-assoc-dyn.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 src/test/ui/type-alias-impl-trait/type-alias-impl-trait-assoc-dyn.rs diff --git a/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-assoc-dyn.rs b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-assoc-dyn.rs new file mode 100644 index 0000000000000..f6a8302967060 --- /dev/null +++ b/src/test/ui/type-alias-impl-trait/type-alias-impl-trait-assoc-dyn.rs @@ -0,0 +1,12 @@ +// check-pass + +#![feature(type_alias_impl_trait)] +#![allow(dead_code)] + +type Foo = Box>; + +fn make_foo() -> Foo { + Box::new(vec![1, 2, 3].into_iter()) +} + +fn main() {}