rust-clippy/tests/ui/methods_unfixable.rs

12 lines
258 B
Rust
Raw Normal View History

#![warn(clippy::filter_next)]
2023-07-27 11:40:22 +00:00
//@no-rustfix
fn main() {
issue10029();
}
pub fn issue10029() {
let iter = (0..10);
let _ = iter.filter(|_| true).next();
//~^ ERROR: called `filter(..).next()` on an `Iterator`. This is more succinctly expre
}