]> git.proxmox.com Git - rustc.git/blame - src/test/ui/issues/issue-59488.stderr
New upstream version 1.66.0+dfsg1
[rustc.git] / src / test / ui / issues / issue-59488.stderr
CommitLineData
48663c56
XL
1error[E0369]: binary operation `>` cannot be applied to type `fn() -> i32 {foo}`
2 --> $DIR/issue-59488.rs:14:9
3 |
4LL | foo > 12;
5 | --- ^ -- {integer}
6 | |
7 | fn() -> i32 {foo}
a2a8927a 8 |
f2b60f7d 9help: use parentheses to call this function
a2a8927a
XL
10 |
11LL | foo() > 12;
12 | ++
48663c56
XL
13
14error[E0308]: mismatched types
15 --> $DIR/issue-59488.rs:14:11
16 |
17LL | foo > 12;
18 | ^^ expected fn item, found integer
19 |
60c5eb7d
XL
20 = note: expected fn item `fn() -> i32 {foo}`
21 found type `i32`
48663c56
XL
22
23error[E0369]: binary operation `>` cannot be applied to type `fn(i64) -> i64 {bar}`
24 --> $DIR/issue-59488.rs:18:9
25 |
26LL | bar > 13;
27 | --- ^ -- {integer}
28 | |
29 | fn(i64) -> i64 {bar}
a2a8927a 30 |
f2b60f7d 31help: use parentheses to call this function
a2a8927a 32 |
f2b60f7d
FG
33LL | bar(/* i64 */) > 13;
34 | +++++++++++
48663c56
XL
35
36error[E0308]: mismatched types
37 --> $DIR/issue-59488.rs:18:11
38 |
39LL | bar > 13;
40 | ^^ expected fn item, found integer
41 |
60c5eb7d
XL
42 = note: expected fn item `fn(i64) -> i64 {bar}`
43 found type `i64`
48663c56
XL
44
45error[E0369]: binary operation `>` cannot be applied to type `fn() -> i32 {foo}`
46 --> $DIR/issue-59488.rs:22:9
47 |
48LL | foo > foo;
49 | --- ^ --- fn() -> i32 {foo}
50 | |
51 | fn() -> i32 {foo}
e74abb32 52 |
f2b60f7d 53help: use parentheses to call these
48663c56 54 |
f2b60f7d
FG
55LL | foo() > foo();
56 | ++ ++
48663c56
XL
57
58error[E0369]: binary operation `>` cannot be applied to type `fn() -> i32 {foo}`
59 --> $DIR/issue-59488.rs:25:9
60 |
61LL | foo > bar;
62 | --- ^ --- fn(i64) -> i64 {bar}
63 | |
64 | fn() -> i32 {foo}
48663c56
XL
65
66error[E0308]: mismatched types
67 --> $DIR/issue-59488.rs:25:11
68 |
69LL | foo > bar;
70 | ^^^ expected fn item, found a different fn item
71 |
60c5eb7d
XL
72 = note: expected fn item `fn() -> i32 {foo}`
73 found fn item `fn(i64) -> i64 {bar}`
48663c56
XL
74
75error[E0369]: binary operation `==` cannot be applied to type `fn(usize) -> Foo {Foo::Bar}`
76 --> $DIR/issue-59488.rs:30:5
77 |
78LL | assert_eq!(Foo::Bar, i);
c295e0f8 79 | ^^^^^^^^^^^^^^^^^^^^^^^
48663c56
XL
80 | |
81 | fn(usize) -> Foo {Foo::Bar}
82 | fn(usize) -> Foo {Foo::Bar}
83 |
17df50a5 84 = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)
48663c56 85
1b1a35ee 86error[E0277]: `fn(usize) -> Foo {Foo::Bar}` doesn't implement `Debug`
48663c56
XL
87 --> $DIR/issue-59488.rs:30:5
88 |
89LL | assert_eq!(Foo::Bar, i);
c295e0f8 90 | ^^^^^^^^^^^^^^^^^^^^^^^ `fn(usize) -> Foo {Foo::Bar}` cannot be formatted using `{:?}` because it doesn't implement `Debug`
48663c56 91 |
f2b60f7d
FG
92 = help: the trait `Debug` is not implemented for fn item `fn(usize) -> Foo {Foo::Bar}`
93 = help: the following other types implement trait `Debug`:
94 extern "C" fn() -> Ret
95 extern "C" fn(A, B) -> Ret
96 extern "C" fn(A, B, ...) -> Ret
97 extern "C" fn(A, B, C) -> Ret
98 extern "C" fn(A, B, C, ...) -> Ret
99 extern "C" fn(A, B, C, D) -> Ret
100 extern "C" fn(A, B, C, D, ...) -> Ret
101 extern "C" fn(A, B, C, D, E) -> Ret
2b03887a 102 and 118 others
f2b60f7d
FG
103 = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)
104
105error[E0277]: `fn(usize) -> Foo {Foo::Bar}` doesn't implement `Debug`
106 --> $DIR/issue-59488.rs:30:5
107 |
108LL | assert_eq!(Foo::Bar, i);
109 | ^^^^^^^^^^^^^^^^^^^^^^^ `fn(usize) -> Foo {Foo::Bar}` cannot be formatted using `{:?}` because it doesn't implement `Debug`
110 |
111 = help: the trait `Debug` is not implemented for fn item `fn(usize) -> Foo {Foo::Bar}`
04454e1e
FG
112 = help: the following other types implement trait `Debug`:
113 extern "C" fn() -> Ret
04454e1e
FG
114 extern "C" fn(A, B) -> Ret
115 extern "C" fn(A, B, ...) -> Ret
116 extern "C" fn(A, B, C) -> Ret
117 extern "C" fn(A, B, C, ...) -> Ret
118 extern "C" fn(A, B, C, D) -> Ret
064997fb
FG
119 extern "C" fn(A, B, C, D, ...) -> Ret
120 extern "C" fn(A, B, C, D, E) -> Ret
2b03887a 121 and 118 others
17df50a5 122 = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)
48663c56 123
f2b60f7d 124error: aborting due to 10 previous errors
48663c56
XL
125
126Some errors have detailed explanations: E0277, E0308, E0369.
127For more information about an error, try `rustc --explain E0277`.