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