]> git.proxmox.com Git - rustc.git/blame - src/test/ui/issues/issue-59488.rs
New upstream version 1.52.0~beta.3+dfsg1
[rustc.git] / src / test / ui / issues / issue-59488.rs
CommitLineData
48663c56
XL
1fn foo() -> i32 {
2 42
3}
4
5fn bar(a: i64) -> i64 {
6 43
7}
8
9enum Foo {
10 Bar(usize),
11}
12
13fn 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}