2018-08-30 07:18:55 -05:00
|
|
|
// run-pass
|
2019-03-11 19:49:17 -05:00
|
|
|
// aux-build:issue-41053.rs
|
2017-04-04 10:11:03 -05:00
|
|
|
|
|
|
|
pub trait Trait { fn foo(&self) {} }
|
|
|
|
|
|
|
|
pub struct Foo;
|
|
|
|
|
|
|
|
impl Iterator for Foo {
|
2019-05-28 13:47:21 -05:00
|
|
|
type Item = Box<dyn Trait>;
|
|
|
|
fn next(&mut self) -> Option<Box<dyn Trait>> {
|
2017-04-04 10:11:03 -05:00
|
|
|
extern crate issue_41053;
|
|
|
|
impl ::Trait for issue_41053::Test {
|
|
|
|
fn foo(&self) {}
|
|
|
|
}
|
|
|
|
Some(Box::new(issue_41053::Test))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
Foo.next().unwrap().foo();
|
|
|
|
}
|