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