summaryrefslogtreecommitdiffstats
path: root/src/test/ui/binop/binary-op-on-double-ref.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/binop/binary-op-on-double-ref.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/ui/binop/binary-op-on-double-ref.rs b/src/test/ui/binop/binary-op-on-double-ref.rs
new file mode 100644
index 000000000..2616c560c
--- /dev/null
+++ b/src/test/ui/binop/binary-op-on-double-ref.rs
@@ -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);
+}