1
1
error[E0369]: binary operation `>` cannot be applied to type `fn() -> i32 {foo}`
2
- --> $DIR/issue-59488.rs:12 :9
2
+ --> $DIR/issue-59488.rs:16 :9
3
3
|
4
4
LL | foo > 12;
5
5
| --- ^ -- {integer}
@@ -8,7 +8,7 @@ LL | foo > 12;
8
8
| help: you might have forgotten to call this function: `foo()`
9
9
10
10
error[E0308]: mismatched types
11
- --> $DIR/issue-59488.rs:12 :11
11
+ --> $DIR/issue-59488.rs:16 :11
12
12
|
13
13
LL | foo > 12;
14
14
| ^^ expected fn item, found integer
@@ -17,7 +17,7 @@ LL | foo > 12;
17
17
found type `i32`
18
18
19
19
error[E0369]: binary operation `>` cannot be applied to type `fn(i64) -> i64 {bar}`
20
- --> $DIR/issue-59488.rs:16 :9
20
+ --> $DIR/issue-59488.rs:20 :9
21
21
|
22
22
LL | bar > 13;
23
23
| --- ^ -- {integer}
@@ -26,7 +26,7 @@ LL | bar > 13;
26
26
| help: you might have forgotten to call this function: `bar( /* arguments */ )`
27
27
28
28
error[E0308]: mismatched types
29
- --> $DIR/issue-59488.rs:16 :11
29
+ --> $DIR/issue-59488.rs:20 :11
30
30
|
31
31
LL | bar > 13;
32
32
| ^^ expected fn item, found integer
@@ -35,7 +35,7 @@ LL | bar > 13;
35
35
found type `i64`
36
36
37
37
error[E0369]: binary operation `>` cannot be applied to type `fn() -> i32 {foo}`
38
- --> $DIR/issue-59488.rs:20 :9
38
+ --> $DIR/issue-59488.rs:24 :9
39
39
|
40
40
LL | foo > foo;
41
41
| --- ^ --- fn() -> i32 {foo}
@@ -51,7 +51,7 @@ LL | foo > foo();
51
51
| ^^^^^
52
52
53
53
error[E0369]: binary operation `>` cannot be applied to type `fn() -> i32 {foo}`
54
- --> $DIR/issue-59488.rs:23 :9
54
+ --> $DIR/issue-59488.rs:27 :9
55
55
|
56
56
LL | foo > bar;
57
57
| --- ^ --- fn(i64) -> i64 {bar}
@@ -61,15 +61,49 @@ LL | foo > bar;
61
61
= note: an implementation of `std::cmp::PartialOrd` might be missing for `fn() -> i32 {foo}`
62
62
63
63
error[E0308]: mismatched types
64
- --> $DIR/issue-59488.rs:23 :11
64
+ --> $DIR/issue-59488.rs:27 :11
65
65
|
66
66
LL | foo > bar;
67
67
| ^^^ expected fn item, found a different fn item
68
68
|
69
69
= note: expected type `fn() -> i32 {foo}`
70
70
found type `fn(i64) -> i64 {bar}`
71
71
72
- error: aborting due to 7 previous errors
72
+ error[E0369]: binary operation `==` cannot be applied to type `fn(usize) -> Foo {Foo::Bar}`
73
+ --> $DIR/issue-59488.rs:32:5
74
+ |
75
+ LL | assert_eq!(Foo::Bar, i);
76
+ | ^^^^^^^^^^^^^^^^^^^^^^^^
77
+ | |
78
+ | fn(usize) -> Foo {Foo::Bar}
79
+ | fn(usize) -> Foo {Foo::Bar}
80
+ |
81
+ = note: an implementation of `std::cmp::PartialEq` might be missing for `fn(usize) -> Foo {Foo::Bar}`
82
+ = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
83
+
84
+ error[E0277]: `fn(usize) -> Foo {Foo::Bar}` doesn't implement `std::fmt::Debug`
85
+ --> $DIR/issue-59488.rs:32:5
86
+ |
87
+ LL | assert_eq!(Foo::Bar, i);
88
+ | ^^^^^^^^^^^^^^^^^^^^^^^^ `fn(usize) -> Foo {Foo::Bar}` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug`
89
+ |
90
+ = help: the trait `std::fmt::Debug` is not implemented for `fn(usize) -> Foo {Foo::Bar}`
91
+ = note: required because of the requirements on the impl of `std::fmt::Debug` for `&fn(usize) -> Foo {Foo::Bar}`
92
+ = note: required by `std::fmt::Debug::fmt`
93
+ = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
94
+
95
+ error[E0277]: `fn(usize) -> Foo {Foo::Bar}` doesn't implement `std::fmt::Debug`
96
+ --> $DIR/issue-59488.rs:32:5
97
+ |
98
+ LL | assert_eq!(Foo::Bar, i);
99
+ | ^^^^^^^^^^^^^^^^^^^^^^^^ `fn(usize) -> Foo {Foo::Bar}` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug`
100
+ |
101
+ = help: the trait `std::fmt::Debug` is not implemented for `fn(usize) -> Foo {Foo::Bar}`
102
+ = note: required because of the requirements on the impl of `std::fmt::Debug` for `&fn(usize) -> Foo {Foo::Bar}`
103
+ = note: required by `std::fmt::Debug::fmt`
104
+ = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
105
+
106
+ error: aborting due to 10 previous errors
73
107
74
- Some errors have detailed explanations: E0308, E0369.
75
- For more information about an error, try `rustc --explain E0308 `.
108
+ Some errors have detailed explanations: E0277, E0308, E0369.
109
+ For more information about an error, try `rustc --explain E0277 `.
0 commit comments