summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-41053.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/issues/issue-41053.rs')
-rw-r--r--tests/ui/issues/issue-41053.rs21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/ui/issues/issue-41053.rs b/tests/ui/issues/issue-41053.rs
new file mode 100644
index 000000000..967edfd44
--- /dev/null
+++ b/tests/ui/issues/issue-41053.rs
@@ -0,0 +1,21 @@
+// run-pass
+// aux-build:issue-41053.rs
+
+pub trait Trait { fn foo(&self) {} }
+
+pub struct Foo;
+
+impl Iterator for Foo {
+ type Item = Box<dyn Trait>;
+ fn next(&mut self) -> Option<Box<dyn Trait>> {
+ 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();
+}