diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-16596.rs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-16596.rs b/src/test/ui/issues/issue-16596.rs new file mode 100644 index 000000000..e7a096302 --- /dev/null +++ b/src/test/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() {} |