2018-08-30 14:18:55 +02:00
|
|
|
// run-pass
|
2019-03-12 00:49:17 +00:00
|
|
|
// aux-build:issue-41053.rs
|
2017-04-04 18:11:03 +03:00
|
|
|
|
|
|
|
pub trait Trait { fn foo(&self) {} }
|
|
|
|
|
|
|
|
pub struct Foo;
|
|
|
|
|
|
|
|
impl Iterator for Foo {
|
2019-05-28 14:47:21 -04:00
|
|
|
type Item = Box<dyn Trait>;
|
|
|
|
fn next(&mut self) -> Option<Box<dyn Trait>> {
|
2017-04-04 18:11:03 +03: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();
|
|
|
|
}
|