summaryrefslogtreecommitdiffstats
path: root/src/test/ui/binop/binary-op-on-double-ref.fixed
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/binop/binary-op-on-double-ref.fixed')
-rw-r--r--src/test/ui/binop/binary-op-on-double-ref.fixed9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/ui/binop/binary-op-on-double-ref.fixed b/src/test/ui/binop/binary-op-on-double-ref.fixed
new file mode 100644
index 000000000..de9dc19af
--- /dev/null
+++ b/src/test/ui/binop/binary-op-on-double-ref.fixed
@@ -0,0 +1,9 @@
+// run-rustfix
+fn main() {
+ let v = vec![1, 2, 3, 4, 5, 6, 7, 8, 9];
+ let vr = v.iter().filter(|x| {
+ *x % 2 == 0
+ //~^ ERROR cannot mod `&&{integer}` by `{integer}`
+ });
+ println!("{:?}", vr);
+}