rust/src/test/ui/binary-op-on-double-ref.rs
2018-12-25 21:08:33 -07:00

9 lines
227 B
Rust

fn main() {
let v = vec![1, 2, 3, 4, 5, 6, 7, 8, 9];
let vr = v.iter().filter(|x| {
x % 2 == 0
//~^ ERROR binary operation `%` cannot be applied to type `&&{integer}`
});
println!("{:?}", vr);
}