summaryrefslogtreecommitdiffstats
path: root/src/test/ui/issues/issue-59488.stderr
blob: 7ce3dedaa887bf7f6a777d0444967c2f1412eff8 (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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
error[E0369]: binary operation `>` cannot be applied to type `fn() -> i32 {foo}`
  --> $DIR/issue-59488.rs:14:9
   |
LL |     foo > 12;
   |     --- ^ -- {integer}
   |     |
   |     fn() -> i32 {foo}
   |
help: you might have forgotten to call this function
   |
LL |     foo() > 12;
   |        ++

error[E0308]: mismatched types
  --> $DIR/issue-59488.rs:14:11
   |
LL |     foo > 12;
   |           ^^ expected fn item, found integer
   |
   = note: expected fn item `fn() -> i32 {foo}`
                 found type `i32`

error[E0369]: binary operation `>` cannot be applied to type `fn(i64) -> i64 {bar}`
  --> $DIR/issue-59488.rs:18:9
   |
LL |     bar > 13;
   |     --- ^ -- {integer}
   |     |
   |     fn(i64) -> i64 {bar}
   |
help: you might have forgotten to call this function
   |
LL |     bar( /* arguments */ ) > 13;
   |        +++++++++++++++++++

error[E0308]: mismatched types
  --> $DIR/issue-59488.rs:18:11
   |
LL |     bar > 13;
   |           ^^ expected fn item, found integer
   |
   = note: expected fn item `fn(i64) -> i64 {bar}`
                 found type `i64`

error[E0369]: binary operation `>` cannot be applied to type `fn() -> i32 {foo}`
  --> $DIR/issue-59488.rs:22:9
   |
LL |     foo > foo;
   |     --- ^ --- fn() -> i32 {foo}
   |     |
   |     fn() -> i32 {foo}
   |
help: you might have forgotten to call this function
   |
LL |     foo() > foo;
   |        ++
help: you might have forgotten to call this function
   |
LL |     foo > foo();
   |              ++

error[E0369]: binary operation `>` cannot be applied to type `fn() -> i32 {foo}`
  --> $DIR/issue-59488.rs:25:9
   |
LL |     foo > bar;
   |     --- ^ --- fn(i64) -> i64 {bar}
   |     |
   |     fn() -> i32 {foo}

error[E0308]: mismatched types
  --> $DIR/issue-59488.rs:25:11
   |
LL |     foo > bar;
   |           ^^^ expected fn item, found a different fn item
   |
   = note: expected fn item `fn() -> i32 {foo}`
              found fn item `fn(i64) -> i64 {bar}`

error[E0369]: binary operation `==` cannot be applied to type `fn(usize) -> Foo {Foo::Bar}`
  --> $DIR/issue-59488.rs:30:5
   |
LL |     assert_eq!(Foo::Bar, i);
   |     ^^^^^^^^^^^^^^^^^^^^^^^
   |     |
   |     fn(usize) -> Foo {Foo::Bar}
   |     fn(usize) -> Foo {Foo::Bar}
   |
   = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)

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`
   |
   = help: the trait `Debug` is not implemented for `fn(usize) -> Foo {Foo::Bar}`
   = 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
           and 68 others
   = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to 9 previous errors

Some errors have detailed explanations: E0277, E0308, E0369.
For more information about an error, try `rustc --explain E0277`.