]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-59488.rs
Do not mention missing `PartialOrd` impl when involving uncalled fns
[rust.git] / src / test / ui / issues / issue-59488.rs
1 // ignore-tidy-linelength
2
3 fn foo() -> i32 {
4     42
5 }
6
7 fn bar(a: i64) -> i64 {
8     43
9 }
10
11 fn main() {
12     foo > 12;
13     //~^ ERROR binary operation `>` cannot be applied to type `fn() -> i32 {foo}` [E0369]
14     //~| ERROR mismatched types [E0308]
15
16     bar > 13;
17     //~^ ERROR binary operation `>` cannot be applied to type `fn(i64) -> i64 {bar}` [E0369]
18     //~| ERROR mismatched types [E0308]
19
20     foo > foo;
21     //~^ ERROR binary operation `>` cannot be applied to type `fn() -> i32 {foo}` [E0369]
22
23     foo > bar;
24     //~^ ERROR binary operation `>` cannot be applied to type `fn() -> i32 {foo}` [E0369]
25     //~| ERROR mismatched types [E0308]
26 }