2015-10-09 20:42:46 +00:00
|
|
|
struct A;
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let a = A;
|
|
|
|
|
2019-12-11 22:11:32 +00:00
|
|
|
a + a; //~ ERROR cannot add `A` to `A`
|
2015-10-10 11:03:18 +00:00
|
|
|
|
2020-01-08 21:49:15 +00:00
|
|
|
a - a; //~ ERROR cannot subtract `A` from `A`
|
2015-10-10 11:03:18 +00:00
|
|
|
|
2020-10-18 02:59:51 +00:00
|
|
|
a * a; //~ ERROR cannot multiply `A` by `A`
|
2015-10-10 11:03:18 +00:00
|
|
|
|
2019-12-11 22:11:32 +00:00
|
|
|
a / a; //~ ERROR cannot divide `A` by `A`
|
2015-10-10 11:03:18 +00:00
|
|
|
|
2019-12-11 22:11:32 +00:00
|
|
|
a % a; //~ ERROR cannot mod `A` by `A`
|
2015-10-10 11:03:18 +00:00
|
|
|
|
2019-12-11 22:11:32 +00:00
|
|
|
a & a; //~ ERROR no implementation for `A & A`
|
2015-10-10 11:03:18 +00:00
|
|
|
|
2019-12-11 22:11:32 +00:00
|
|
|
a | a; //~ ERROR no implementation for `A | A`
|
2015-10-10 11:03:18 +00:00
|
|
|
|
2019-12-11 22:11:32 +00:00
|
|
|
a << a; //~ ERROR no implementation for `A << A`
|
2015-10-10 11:03:18 +00:00
|
|
|
|
2019-12-11 22:11:32 +00:00
|
|
|
a >> a; //~ ERROR no implementation for `A >> A`
|
2015-10-10 11:03:18 +00: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 20:42:46 +00:00
|
|
|
|
2015-10-10 11:03:18 +00:00
|
|
|
a < a; //~ ERROR binary operation `<` cannot be applied to type `A`
|
2015-10-09 20:42:46 +00:00
|
|
|
|
2015-10-10 11:03:18 +00:00
|
|
|
a <= a; //~ ERROR binary operation `<=` cannot be applied to type `A`
|
2015-10-09 20:42:46 +00:00
|
|
|
|
2015-10-10 11:03:18 +00:00
|
|
|
a > a; //~ ERROR binary operation `>` cannot be applied to type `A`
|
2015-10-09 20:42:46 +00:00
|
|
|
|
2015-10-10 11:03:18 +00:00
|
|
|
a >= a; //~ ERROR binary operation `>=` cannot be applied to type `A`
|
2015-10-09 20:42:46 +00:00
|
|
|
}
|