rust/tests/crashes/131342.rs

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

16 lines
338 B
Rust
Raw Normal View History

2024-10-09 08:34:45 -05:00
//@ known-bug: #131342
fn main() {
let mut items = vec![1, 2, 3, 4, 5].into_iter();
problem_thingy(&mut items);
2024-10-09 08:34:45 -05:00
}
fn problem_thingy(items: &mut impl Iterator<Item = u8>) {
let mut peeker = items.peekable();
match peeker.peek() {
Some(_) => (),
None => return (),
}
problem_thingy(&mut peeker);
2024-10-09 08:34:45 -05:00
}