2019-04-07 22:51:33 +09:00
|
|
|
error[E0369]: binary operation `>` cannot be applied to type `fn() -> i32 {foo}`
|
2019-04-22 17:35:37 +01:00
|
|
|
--> $DIR/issue-59488.rs:14:9
|
2019-04-07 22:51:33 +09:00
|
|
|
|
|
|
|
|
LL | foo > 12;
|
|
|
|
| --- ^ -- {integer}
|
|
|
|
| |
|
|
|
|
| fn() -> i32 {foo}
|
2021-12-03 23:05:49 +00:00
|
|
|
|
|
2022-08-28 01:08:24 +00:00
|
|
|
help: use parentheses to call this function
|
2021-12-03 23:05:49 +00:00
|
|
|
|
|
|
|
|
LL | foo() > 12;
|
|
|
|
| ++
|
2019-04-07 22:51:33 +09:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2019-04-22 17:35:37 +01:00
|
|
|
--> $DIR/issue-59488.rs:14:11
|
2019-04-07 22:51:33 +09:00
|
|
|
|
|
|
|
|
LL | foo > 12;
|
2023-01-02 18:00:33 -08:00
|
|
|
| ^^ expected fn item, found `i32`
|
2019-04-07 22:51:33 +09:00
|
|
|
|
|
2019-11-13 14:16:56 -08:00
|
|
|
= note: expected fn item `fn() -> i32 {foo}`
|
|
|
|
found type `i32`
|
2019-04-07 22:51:33 +09:00
|
|
|
|
2019-04-12 00:00:27 +09:00
|
|
|
error[E0369]: binary operation `>` cannot be applied to type `fn(i64) -> i64 {bar}`
|
2019-04-22 17:35:37 +01:00
|
|
|
--> $DIR/issue-59488.rs:18:9
|
2019-04-12 00:00:27 +09:00
|
|
|
|
|
|
|
|
LL | bar > 13;
|
|
|
|
| --- ^ -- {integer}
|
|
|
|
| |
|
|
|
|
| fn(i64) -> i64 {bar}
|
2021-12-03 23:05:49 +00:00
|
|
|
|
|
2022-08-28 01:08:24 +00:00
|
|
|
help: use parentheses to call this function
|
2021-12-03 23:05:49 +00:00
|
|
|
|
|
2022-08-28 01:22:51 +00:00
|
|
|
LL | bar(/* i64 */) > 13;
|
|
|
|
| +++++++++++
|
2019-04-12 00:00:27 +09:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2019-04-22 17:35:37 +01:00
|
|
|
--> $DIR/issue-59488.rs:18:11
|
2019-04-12 00:00:27 +09:00
|
|
|
|
|
|
|
|
LL | bar > 13;
|
2023-01-02 18:00:33 -08:00
|
|
|
| ^^ expected fn item, found `i64`
|
2019-04-12 00:00:27 +09:00
|
|
|
|
|
2019-11-13 14:16:56 -08:00
|
|
|
= note: expected fn item `fn(i64) -> i64 {bar}`
|
|
|
|
found type `i64`
|
2019-04-12 00:00:27 +09:00
|
|
|
|
2019-04-12 22:59:30 +09:00
|
|
|
error[E0369]: binary operation `>` cannot be applied to type `fn() -> i32 {foo}`
|
2019-04-22 17:35:37 +01:00
|
|
|
--> $DIR/issue-59488.rs:22:9
|
2019-04-12 22:59:30 +09:00
|
|
|
|
|
|
|
|
LL | foo > foo;
|
|
|
|
| --- ^ --- fn() -> i32 {foo}
|
|
|
|
| |
|
|
|
|
| fn() -> i32 {foo}
|
2019-10-23 22:20:58 -07:00
|
|
|
|
|
2022-08-28 01:08:24 +00:00
|
|
|
help: use parentheses to call these
|
2019-04-12 22:59:30 +09:00
|
|
|
|
|
2022-08-28 01:08:24 +00:00
|
|
|
LL | foo() > foo();
|
|
|
|
| ++ ++
|
2019-04-12 22:59:30 +09:00
|
|
|
|
|
|
|
error[E0369]: binary operation `>` cannot be applied to type `fn() -> i32 {foo}`
|
2019-04-22 17:35:37 +01:00
|
|
|
--> $DIR/issue-59488.rs:25:9
|
2019-04-12 22:59:30 +09:00
|
|
|
|
|
|
|
|
LL | foo > bar;
|
|
|
|
| --- ^ --- fn(i64) -> i64 {bar}
|
|
|
|
| |
|
|
|
|
| fn() -> i32 {foo}
|
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2019-04-22 17:35:37 +01:00
|
|
|
--> $DIR/issue-59488.rs:25:11
|
2019-04-12 22:59:30 +09:00
|
|
|
|
|
|
|
|
LL | foo > bar;
|
|
|
|
| ^^^ expected fn item, found a different fn item
|
|
|
|
|
|
2019-11-13 14:16:56 -08:00
|
|
|
= note: expected fn item `fn() -> i32 {foo}`
|
|
|
|
found fn item `fn(i64) -> i64 {bar}`
|
2019-04-12 22:59:30 +09:00
|
|
|
|
2019-04-19 04:34:54 +00:00
|
|
|
error[E0369]: binary operation `==` cannot be applied to type `fn(usize) -> Foo {Foo::Bar}`
|
2019-04-22 17:35:37 +01:00
|
|
|
--> $DIR/issue-59488.rs:30:5
|
2019-04-19 04:34:54 +00:00
|
|
|
|
|
|
|
|
LL | assert_eq!(Foo::Bar, i);
|
2021-10-14 13:28:28 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^
|
2019-04-19 04:34:54 +00:00
|
|
|
| |
|
|
|
|
| fn(usize) -> Foo {Foo::Bar}
|
|
|
|
| fn(usize) -> Foo {Foo::Bar}
|
|
|
|
|
|
2021-02-13 14:52:25 -05:00
|
|
|
= note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)
|
2019-04-19 04:34:54 +00:00
|
|
|
|
2020-09-02 10:40:56 +03:00
|
|
|
error[E0277]: `fn(usize) -> Foo {Foo::Bar}` doesn't implement `Debug`
|
2019-04-22 17:35:37 +01:00
|
|
|
--> $DIR/issue-59488.rs:30:5
|
2019-04-19 04:34:54 +00:00
|
|
|
|
|
|
|
|
LL | assert_eq!(Foo::Bar, i);
|
2021-10-14 13:28:28 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^ `fn(usize) -> Foo {Foo::Bar}` cannot be formatted using `{:?}` because it doesn't implement `Debug`
|
2019-04-19 04:34:54 +00:00
|
|
|
|
|
2022-08-29 16:53:36 +03:00
|
|
|
= help: the trait `Debug` is not implemented for fn item `fn(usize) -> Foo {Foo::Bar}`
|
2022-03-27 01:49:01 +00:00
|
|
|
= help: the following other types implement trait `Debug`:
|
|
|
|
extern "C" fn() -> Ret
|
|
|
|
extern "C" fn(A, B) -> Ret
|
|
|
|
extern "C" fn(A, B, ...) -> Ret
|
|
|
|
extern "C" fn(A, B, C) -> Ret
|
|
|
|
extern "C" fn(A, B, C, ...) -> Ret
|
|
|
|
extern "C" fn(A, B, C, D) -> Ret
|
2022-06-16 14:14:38 -07:00
|
|
|
extern "C" fn(A, B, C, D, ...) -> Ret
|
|
|
|
extern "C" fn(A, B, C, D, E) -> Ret
|
2022-08-31 22:55:04 -07:00
|
|
|
and 118 others
|
2021-02-13 14:52:25 -05:00
|
|
|
= note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)
|
2019-04-19 04:34:54 +00:00
|
|
|
|
2022-08-16 06:27:22 +00:00
|
|
|
error[E0277]: `fn(usize) -> Foo {Foo::Bar}` doesn't implement `Debug`
|
|
|
|
--> $DIR/issue-59488.rs:30:5
|
|
|
|
|
|
|
|
|
LL | assert_eq!(Foo::Bar, i);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^ `fn(usize) -> Foo {Foo::Bar}` cannot be formatted using `{:?}` because it doesn't implement `Debug`
|
|
|
|
|
|
2022-08-29 16:53:36 +03:00
|
|
|
= help: the trait `Debug` is not implemented for fn item `fn(usize) -> Foo {Foo::Bar}`
|
2022-08-16 06:27:22 +00:00
|
|
|
= help: the following other types implement trait `Debug`:
|
|
|
|
extern "C" fn() -> Ret
|
|
|
|
extern "C" fn(A, B) -> Ret
|
|
|
|
extern "C" fn(A, B, ...) -> Ret
|
|
|
|
extern "C" fn(A, B, C) -> Ret
|
|
|
|
extern "C" fn(A, B, C, ...) -> Ret
|
|
|
|
extern "C" fn(A, B, C, D) -> Ret
|
|
|
|
extern "C" fn(A, B, C, D, ...) -> Ret
|
|
|
|
extern "C" fn(A, B, C, D, E) -> Ret
|
2022-08-31 22:55:04 -07:00
|
|
|
and 118 others
|
2022-08-16 06:27:22 +00:00
|
|
|
= note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)
|
|
|
|
|
|
|
|
error: aborting due to 10 previous errors
|
2019-04-07 22:51:33 +09:00
|
|
|
|
2019-04-19 04:34:54 +00:00
|
|
|
Some errors have detailed explanations: E0277, E0308, E0369.
|
|
|
|
For more information about an error, try `rustc --explain E0277`.
|