blob: aa3f66b2e28e1e3a19924e19c4e8c5c32ed3c8d9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
// build-fail
//~^ 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))
}
|