]> git.lizzy.rs Git - rust.git/blob - tests/ui/recursion/issue-83150.rs
Rollup merge of #106759 - compiler-errors:revert-105255, r=cjgillot
[rust.git] / tests / ui / recursion / issue-83150.rs
1 // build-fail
2 // compile-flags: -Copt-level=0
3 // normalize-stderr-test: "long-type-\d+" -> "long-type-hash"
4 //~^^^ ERROR overflow evaluating the requirement
5
6 fn main() {
7     let mut iter = 0u8..1;
8     func(&mut iter)
9 }
10
11 fn func<T: Iterator<Item = u8>>(iter: &mut T) { //~ WARN function cannot return without recursing
12     func(&mut iter.map(|x| x + 1))
13 }