2015-10-09 15:42:46 -05:00
|
|
|
struct A;
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let a = A;
|
|
|
|
|
2019-12-11 16:11:32 -06:00
|
|
|
a + a; //~ ERROR cannot add `A` to `A`
|
2015-10-10 06:03:18 -05:00
|
|
|
|
2020-01-08 15:49:15 -06:00
|
|
|
a - a; //~ ERROR cannot subtract `A` from `A`
|
2015-10-10 06:03:18 -05:00
|
|
|
|
2020-10-17 21:59:51 -05:00
|
|
|
a * a; //~ ERROR cannot multiply `A` by `A`
|
2015-10-10 06:03:18 -05:00
|
|
|
|
2019-12-11 16:11:32 -06:00
|
|
|
a / a; //~ ERROR cannot divide `A` by `A`
|
2015-10-10 06:03:18 -05:00
|
|
|
|
2023-01-30 13:54:33 -06:00
|
|
|
a % a; //~ ERROR cannot calculate the remainder of `A` divided by `A`
|
2015-10-10 06:03:18 -05:00
|
|
|
|
2019-12-11 16:11:32 -06:00
|
|
|
a & a; //~ ERROR no implementation for `A & A`
|
2015-10-10 06:03:18 -05:00
|
|
|
|
2019-12-11 16:11:32 -06:00
|
|
|
a | a; //~ ERROR no implementation for `A | A`
|
2015-10-10 06:03:18 -05:00
|
|
|
|
2019-12-11 16:11:32 -06:00
|
|
|
a << a; //~ ERROR no implementation for `A << A`
|
2015-10-10 06:03:18 -05:00
|
|
|
|
2019-12-11 16:11:32 -06:00
|
|
|
a >> a; //~ ERROR no implementation for `A >> A`
|
2015-10-10 06:03:18 -05:00
|
|
|
|
|
|
|
a == a; //~ ERROR binary operation `==` cannot be applied to type `A`
|
|
|
|
|
|
|
|
a != a; //~ ERROR binary operation `!=` cannot be applied to type `A`
|
2015-10-09 15:42:46 -05:00
|
|
|
|
2015-10-10 06:03:18 -05:00
|
|
|
a < a; //~ ERROR binary operation `<` cannot be applied to type `A`
|
2015-10-09 15:42:46 -05:00
|
|
|
|
2015-10-10 06:03:18 -05:00
|
|
|
a <= a; //~ ERROR binary operation `<=` cannot be applied to type `A`
|
2015-10-09 15:42:46 -05:00
|
|
|
|
2015-10-10 06:03:18 -05:00
|
|
|
a > a; //~ ERROR binary operation `>` cannot be applied to type `A`
|
2015-10-09 15:42:46 -05:00
|
|
|
|
2015-10-10 06:03:18 -05:00
|
|
|
a >= a; //~ ERROR binary operation `>=` cannot be applied to type `A`
|
2015-10-09 15:42:46 -05:00
|
|
|
}
|