mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 23:04:33 +00:00
bd8477b562
This reverts commit 5af56cac38
.
17 lines
343 B
Rust
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);
|
|
}
|