mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
Use of impl trait in an impl as the valoe for an associated type in a dyn
This commit is contained in:
parent
a9ab2e5539
commit
eb16ae723d
@ -0,0 +1,12 @@
|
||||
// check-pass
|
||||
|
||||
#![feature(type_alias_impl_trait)]
|
||||
#![allow(dead_code)]
|
||||
|
||||
type Foo = Box<dyn Iterator<Item = impl Send>>;
|
||||
|
||||
fn make_foo() -> Foo {
|
||||
Box::new(vec![1, 2, 3].into_iter())
|
||||
}
|
||||
|
||||
fn main() {}
|
Loading…
Reference in New Issue
Block a user