rust/tests/ui/recursion/issue-83150.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
398 B
Rust
Raw Normal View History

// build-fail
// compile-flags: -Copt-level=0
// normalize-stderr-test: "long-type-\d+" -> "long-type-hash"
//~^^^ ERROR overflow evaluating the requirement
2023-06-09 16:56:16 -05:00
// ignore-compare-mode-next-solver (hangs)
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))
}