]>
Commit | Line | Data |
---|---|---|
ba9703b0 XL |
1 | error[E0369]: binary operation `==` cannot be applied to type `fn() -> i32 {a}` |
2 | --> $DIR/issue-70724-add_type_neq_err_label-unwrap.rs:6:5 | |
3 | | | |
4 | LL | assert_eq!(a, 0); | |
5 | | ^^^^^^^^^^^^^^^^^ | |
6 | | | | |
7 | | fn() -> i32 {a} | |
8 | | {integer} | |
9 | | help: you might have forgotten to call this function: `*left_val()` | |
10 | | | |
11 | = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) | |
12 | ||
13 | error[E0308]: mismatched types | |
14 | --> $DIR/issue-70724-add_type_neq_err_label-unwrap.rs:6:5 | |
15 | | | |
16 | LL | assert_eq!(a, 0); | |
17 | | ^^^^^^^^^^^^^^^^^ expected fn item, found integer | |
18 | | | |
19 | = note: expected fn item `fn() -> i32 {a}` | |
20 | found type `i32` | |
21 | = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) | |
22 | ||
1b1a35ee | 23 | error[E0277]: `fn() -> i32 {a}` doesn't implement `Debug` |
ba9703b0 XL |
24 | --> $DIR/issue-70724-add_type_neq_err_label-unwrap.rs:6:5 |
25 | | | |
26 | LL | fn a() -> i32 { | |
27 | | - consider calling this function | |
28 | ... | |
29 | LL | assert_eq!(a, 0); | |
1b1a35ee | 30 | | ^^^^^^^^^^^^^^^^^ `fn() -> i32 {a}` cannot be formatted using `{:?}` because it doesn't implement `Debug` |
6a06907d XL |
31 | | |
32 | ::: $SRC_DIR/core/src/panicking.rs:LL:COL | |
33 | | | |
34 | LL | T: fmt::Debug + ?Sized, | |
35 | | ---------- required by this bound in `core::panicking::assert_failed` | |
ba9703b0 | 36 | | |
1b1a35ee | 37 | = help: the trait `Debug` is not implemented for `fn() -> i32 {a}` |
ba9703b0 | 38 | = help: use parentheses to call the function: `a()` |
ba9703b0 XL |
39 | = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) |
40 | ||
41 | error: aborting due to 3 previous errors | |
42 | ||
43 | Some errors have detailed explanations: E0277, E0308, E0369. | |
44 | For more information about an error, try `rustc --explain E0277`. |