rust/tests/crashes/131342.rs
Rémy Rakic bd8477b562 Revert "Emit error when calling/declaring functions with unavailable vectors."
This reverts commit 5af56cac38fa48e4228e5e123d060e85eb1acbf7.
2024-10-25 20:42:09 +00:00

17 lines
343 B
Rust

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