summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-16596.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/issues/issue-16596.rs')
-rw-r--r--tests/ui/issues/issue-16596.rs22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/ui/issues/issue-16596.rs b/tests/ui/issues/issue-16596.rs
new file mode 100644
index 000000000..e7a096302
--- /dev/null
+++ b/tests/ui/issues/issue-16596.rs
@@ -0,0 +1,22 @@
+// check-pass
+#![allow(dead_code)]
+
+trait MatrixRow { fn dummy(&self) { }}
+
+struct Mat;
+
+impl<'a> MatrixRow for &'a Mat {}
+
+struct Rows<M: MatrixRow> {
+ mat: M,
+}
+
+impl<'a> Iterator for Rows<&'a Mat> {
+ type Item = ();
+
+ fn next(&mut self) -> Option<()> {
+ unimplemented!()
+ }
+}
+
+fn main() {}