blob: 11b0e4ba19c581a8b1c2c1ae72d3886daa656d04 [file] [log] [blame]
error[E0369]: binary operation `==` cannot be applied to type `fn() -> i32 {a}`
--> $DIR/binary-operation-error-on-function-70724.rs:7:5
|
LL | assert_eq!(a, 0);
| ^^^^^^^^^^^^^^^^
| |
| fn() -> i32 {a}
| {integer}
|
= note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0308]: mismatched types
--> $DIR/binary-operation-error-on-function-70724.rs:7:5
|
LL | assert_eq!(a, 0);
| ^^^^^^^^^^^^^^^^ expected fn item, found integer
|
= note: expected fn item `fn() -> i32 {a}`
found type `{integer}`
= note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: `fn() -> i32 {a}` doesn't implement `Debug`
--> $DIR/binary-operation-error-on-function-70724.rs:7:5
|
LL | fn a() -> i32 {
| - consider calling this function
...
LL | assert_eq!(a, 0);
| ^^^^^^^^^^^^^^^^ the trait `Debug` is not implemented for fn item `fn() -> i32 {a}`
|
= help: use parentheses to call this function: `a()`
= note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to 3 previous errors
Some errors have detailed explanations: E0277, E0308, E0369.
For more information about an error, try `rustc --explain E0277`.