rust/src/test/ui/issues/issue-28837.rs
2018-12-25 21:08:33 -07:00

36 lines
1.1 KiB
Rust

struct A;
fn main() {
let a = A;
a + a; //~ ERROR binary operation `+` cannot be applied to type `A`
a - a; //~ ERROR binary operation `-` cannot be applied to type `A`
a * a; //~ ERROR binary operation `*` cannot be applied to type `A`
a / a; //~ ERROR binary operation `/` cannot be applied to type `A`
a % a; //~ ERROR binary operation `%` cannot be applied to type `A`
a & a; //~ ERROR binary operation `&` cannot be applied to type `A`
a | a; //~ ERROR binary operation `|` cannot be applied to type `A`
a << a; //~ ERROR binary operation `<<` cannot be applied to type `A`
a >> a; //~ ERROR binary operation `>>` cannot be applied to type `A`
a == a; //~ ERROR binary operation `==` cannot be applied to type `A`
a != a; //~ ERROR binary operation `!=` cannot be applied to type `A`
a < a; //~ ERROR binary operation `<` cannot be applied to type `A`
a <= a; //~ ERROR binary operation `<=` cannot be applied to type `A`
a > a; //~ ERROR binary operation `>` cannot be applied to type `A`
a >= a; //~ ERROR binary operation `>=` cannot be applied to type `A`
}