]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-59488.stderr
Rollup merge of #91804 - woppopo:const_clone, r=oli-obk
[rust.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: you might have forgotten 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: you might have forgotten to call this function
32    |
33 LL |     bar( /* arguments */ ) > 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: you might have forgotten to call this function
54    |
55 LL |     foo() > foo;
56    |        ++
57 help: you might have forgotten to call this function
58    |
59 LL |     foo > foo();
60    |              ++
61
62 error[E0369]: binary operation `>` cannot be applied to type `fn() -> i32 {foo}`
63   --> $DIR/issue-59488.rs:25:9
64    |
65 LL |     foo > bar;
66    |     --- ^ --- fn(i64) -> i64 {bar}
67    |     |
68    |     fn() -> i32 {foo}
69
70 error[E0308]: mismatched types
71   --> $DIR/issue-59488.rs:25:11
72    |
73 LL |     foo > bar;
74    |           ^^^ expected fn item, found a different fn item
75    |
76    = note: expected fn item `fn() -> i32 {foo}`
77               found fn item `fn(i64) -> i64 {bar}`
78
79 error[E0369]: binary operation `==` cannot be applied to type `fn(usize) -> Foo {Foo::Bar}`
80   --> $DIR/issue-59488.rs:30:5
81    |
82 LL |     assert_eq!(Foo::Bar, i);
83    |     ^^^^^^^^^^^^^^^^^^^^^^^
84    |     |
85    |     fn(usize) -> Foo {Foo::Bar}
86    |     fn(usize) -> Foo {Foo::Bar}
87    |
88    = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)
89
90 error[E0277]: `fn(usize) -> Foo {Foo::Bar}` doesn't implement `Debug`
91   --> $DIR/issue-59488.rs:30:5
92    |
93 LL |     assert_eq!(Foo::Bar, i);
94    |     ^^^^^^^^^^^^^^^^^^^^^^^ `fn(usize) -> Foo {Foo::Bar}` cannot be formatted using `{:?}` because it doesn't implement `Debug`
95    |
96    = help: the trait `Debug` is not implemented for `fn(usize) -> Foo {Foo::Bar}`
97    = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)
98
99 error: aborting due to 9 previous errors
100
101 Some errors have detailed explanations: E0277, E0308, E0369.
102 For more information about an error, try `rustc --explain E0277`.