Rollup merge of #88194 - spastorino:test-tait-assoc-impl-trait, r=oli-obk

Test use of impl Trait in an impl as the value for an associated type in an impl trait

r? `@oli-obk`

Related to #86727
This commit is contained in:
Jack Huey 2021-08-21 20:56:37 -04:00 committed by GitHub
commit 66b04c6501
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -0,0 +1,19 @@
// check-pass
#![feature(type_alias_impl_trait)]
#![allow(dead_code)]
type Foo = impl Iterator<Item = impl Send>;
fn make_foo() -> Foo {
vec![1, 2].into_iter()
}
type Bar = impl Send;
type Baz = impl Iterator<Item = Bar>;
fn make_baz() -> Baz {
vec!["1", "2"].into_iter()
}
fn main() {}