summaryrefslogtreecommitdiffstats
path: root/src/test/ui/recursion/issue-83150.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/recursion/issue-83150.rs')
-rw-r--r--src/test/ui/recursion/issue-83150.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/test/ui/recursion/issue-83150.rs b/src/test/ui/recursion/issue-83150.rs
new file mode 100644
index 000000000..e647f0ff4
--- /dev/null
+++ b/src/test/ui/recursion/issue-83150.rs
@@ -0,0 +1,12 @@
+// build-fail
+// compile-flags: -Copt-level=0
+//~^^ ERROR overflow evaluating the requirement
+
+fn main() {
+ let mut iter = 0u8..1;
+ func(&mut iter)
+}
+
+fn func<T: Iterator<Item = u8>>(iter: &mut T) { //~ WARN function cannot return without recursing
+ func(&mut iter.map(|x| x + 1))
+}