summaryrefslogtreecommitdiffstats
path: root/src/test/ui/issues/issue-70724-add_type_neq_err_label-unwrap.stderr
blob: 7f29709ce50958bf9d72f716b73e8c3c6d8e4fa7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
error[E0369]: binary operation `==` cannot be applied to type `fn() -> i32 {a}`
  --> $DIR/issue-70724-add_type_neq_err_label-unwrap.rs:6: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/issue-70724-add_type_neq_err_label-unwrap.rs:6: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/issue-70724-add_type_neq_err_label-unwrap.rs:6:5
   |
LL | fn a() -> i32 {
   |    - consider calling this function
...
LL |     assert_eq!(a, 0);
   |     ^^^^^^^^^^^^^^^^ `fn() -> i32 {a}` cannot be formatted using `{:?}` because it doesn't implement `Debug`
   |
   = help: the trait `Debug` is not implemented for fn item `fn() -> i32 {a}`
   = help: use parentheses to call the 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`.