1 error[E0369]: binary operation `>` cannot be applied to type `fn() -> i32 {foo}`
2 --> $DIR/issue-59488.rs:14:9
9 help: use parentheses to call this function
14 error[E0308]: mismatched types
15 --> $DIR/issue-59488.rs:14:11
18 | ^^ expected fn item, found integer
20 = note: expected fn item `fn() -> i32 {foo}`
23 error[E0369]: binary operation `>` cannot be applied to type `fn(i64) -> i64 {bar}`
24 --> $DIR/issue-59488.rs:18:9
29 | fn(i64) -> i64 {bar}
31 help: use parentheses to call this function
33 LL | bar(/* i64 */) > 13;
36 error[E0308]: mismatched types
37 --> $DIR/issue-59488.rs:18:11
40 | ^^ expected fn item, found integer
42 = note: expected fn item `fn(i64) -> i64 {bar}`
45 error[E0369]: binary operation `>` cannot be applied to type `fn() -> i32 {foo}`
46 --> $DIR/issue-59488.rs:22:9
49 | --- ^ --- fn() -> i32 {foo}
53 help: use parentheses to call these
58 error[E0369]: binary operation `>` cannot be applied to type `fn() -> i32 {foo}`
59 --> $DIR/issue-59488.rs:25:9
62 | --- ^ --- fn(i64) -> i64 {bar}
66 error[E0308]: mismatched types
67 --> $DIR/issue-59488.rs:25:11
70 | ^^^ expected fn item, found a different fn item
72 = note: expected fn item `fn() -> i32 {foo}`
73 found fn item `fn(i64) -> i64 {bar}`
75 error[E0369]: binary operation `==` cannot be applied to type `fn(usize) -> Foo {Foo::Bar}`
76 --> $DIR/issue-59488.rs:30:5
78 LL | assert_eq!(Foo::Bar, i);
79 | ^^^^^^^^^^^^^^^^^^^^^^^
81 | fn(usize) -> Foo {Foo::Bar}
82 | fn(usize) -> Foo {Foo::Bar}
84 = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)
86 error[E0277]: `fn(usize) -> Foo {Foo::Bar}` doesn't implement `Debug`
87 --> $DIR/issue-59488.rs:30:5
89 LL | assert_eq!(Foo::Bar, i);
90 | ^^^^^^^^^^^^^^^^^^^^^^^ `fn(usize) -> Foo {Foo::Bar}` cannot be formatted using `{:?}` because it doesn't implement `Debug`
92 = help: the trait `Debug` is not implemented for fn item `fn(usize) -> Foo {Foo::Bar}`
93 = help: the following other types implement trait `Debug`:
94 extern "C" fn() -> Ret
95 extern "C" fn(A, B) -> Ret
96 extern "C" fn(A, B, ...) -> Ret
97 extern "C" fn(A, B, C) -> Ret
98 extern "C" fn(A, B, C, ...) -> Ret
99 extern "C" fn(A, B, C, D) -> Ret
100 extern "C" fn(A, B, C, D, ...) -> Ret
101 extern "C" fn(A, B, C, D, E) -> Ret
103 = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)
105 error[E0277]: `fn(usize) -> Foo {Foo::Bar}` doesn't implement `Debug`
106 --> $DIR/issue-59488.rs:30:5
108 LL | assert_eq!(Foo::Bar, i);
109 | ^^^^^^^^^^^^^^^^^^^^^^^ `fn(usize) -> Foo {Foo::Bar}` cannot be formatted using `{:?}` because it doesn't implement `Debug`
111 = help: the trait `Debug` is not implemented for fn item `fn(usize) -> Foo {Foo::Bar}`
112 = help: the following other types implement trait `Debug`:
113 extern "C" fn() -> Ret
114 extern "C" fn(A, B) -> Ret
115 extern "C" fn(A, B, ...) -> Ret
116 extern "C" fn(A, B, C) -> Ret
117 extern "C" fn(A, B, C, ...) -> Ret
118 extern "C" fn(A, B, C, D) -> Ret
119 extern "C" fn(A, B, C, D, ...) -> Ret
120 extern "C" fn(A, B, C, D, E) -> Ret
122 = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)
124 error: aborting due to 10 previous errors
126 Some errors have detailed explanations: E0277, E0308, E0369.
127 For more information about an error, try `rustc --explain E0277`.