]> git.proxmox.com Git - rustc.git/blob - src/test/ui/issues/issue-28837.rs
New upstream version 1.50.0+dfsg1
[rustc.git] / src / test / ui / issues / issue-28837.rs
1 struct A;
2
3 fn main() {
4 let a = A;
5
6 a + a; //~ ERROR cannot add `A` to `A`
7
8 a - a; //~ ERROR cannot subtract `A` from `A`
9
10 a * a; //~ ERROR cannot multiply `A` by `A`
11
12 a / a; //~ ERROR cannot divide `A` by `A`
13
14 a % a; //~ ERROR cannot mod `A` by `A`
15
16 a & a; //~ ERROR no implementation for `A & A`
17
18 a | a; //~ ERROR no implementation for `A | A`
19
20 a << a; //~ ERROR no implementation for `A << A`
21
22 a >> a; //~ ERROR no implementation for `A >> A`
23
24 a == a; //~ ERROR binary operation `==` cannot be applied to type `A`
25
26 a != a; //~ ERROR binary operation `!=` cannot be applied to type `A`
27
28 a < a; //~ ERROR binary operation `<` cannot be applied to type `A`
29
30 a <= a; //~ ERROR binary operation `<=` cannot be applied to type `A`
31
32 a > a; //~ ERROR binary operation `>` cannot be applied to type `A`
33
34 a >= a; //~ ERROR binary operation `>=` cannot be applied to type `A`
35 }