]>
Commit | Line | Data |
---|---|---|
48663c56 XL |
1 | fn foo() -> i32 { |
2 | 42 | |
3 | } | |
4 | ||
5 | fn bar(a: i64) -> i64 { | |
6 | 43 | |
7 | } | |
8 | ||
9 | enum Foo { | |
10 | Bar(usize), | |
11 | } | |
12 | ||
13 | fn main() { | |
14 | foo > 12; | |
15 | //~^ ERROR binary operation `>` cannot be applied to type `fn() -> i32 {foo}` [E0369] | |
16 | //~| ERROR mismatched types [E0308] | |
17 | ||
18 | bar > 13; | |
19 | //~^ ERROR binary operation `>` cannot be applied to type `fn(i64) -> i64 {bar}` [E0369] | |
20 | //~| ERROR mismatched types [E0308] | |
21 | ||
22 | foo > foo; | |
23 | //~^ ERROR binary operation `>` cannot be applied to type `fn() -> i32 {foo}` [E0369] | |
24 | ||
25 | foo > bar; | |
26 | //~^ ERROR binary operation `>` cannot be applied to type `fn() -> i32 {foo}` [E0369] | |
27 | //~| ERROR mismatched types [E0308] | |
28 | ||
29 | let i = Foo::Bar; | |
30 | assert_eq!(Foo::Bar, i); | |
31 | //~^ ERROR binary operation `==` cannot be applied to type `fn(usize) -> Foo {Foo::Bar}` [E0369] | |
1b1a35ee | 32 | //~| ERROR `fn(usize) -> Foo {Foo::Bar}` doesn't implement `Debug` [E0277] |
48663c56 | 33 | } |