diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/auxiliary/issue-16643.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/test/ui/issues/auxiliary/issue-16643.rs b/src/test/ui/issues/auxiliary/issue-16643.rs new file mode 100644 index 000000000..7808e0119 --- /dev/null +++ b/src/test/ui/issues/auxiliary/issue-16643.rs @@ -0,0 +1,19 @@ +#![crate_type = "lib"] + +pub struct TreeBuilder<H> { pub h: H } + +impl<H> TreeBuilder<H> { + pub fn process_token(&mut self) { + match self { + _ => for _y in self.by_ref() {} + } + } +} + +impl<H> Iterator for TreeBuilder<H> { + type Item = H; + + fn next(&mut self) -> Option<H> { + None + } +} |