rust/src/test/ui/issues/issue-59488.stderr

110 lines
4.0 KiB
Plaintext
Raw Normal View History

2019-04-07 08:51:33 -05:00
error[E0369]: binary operation `>` cannot be applied to type `fn() -> i32 {foo}`
2019-04-22 11:35:37 -05:00
--> $DIR/issue-59488.rs:14:9
2019-04-07 08:51:33 -05:00
|
LL | foo > 12;
| --- ^ -- {integer}
| |
| fn() -> i32 {foo}
| help: you might have forgotten to call this function: `foo()`
2019-04-07 08:51:33 -05:00
error[E0308]: mismatched types
2019-04-22 11:35:37 -05:00
--> $DIR/issue-59488.rs:14:11
2019-04-07 08:51:33 -05:00
|
LL | foo > 12;
| ^^ expected fn item, found integer
|
= note: expected type `fn() -> i32 {foo}`
2019-04-11 10:00:27 -05:00
found type `i32`
2019-04-07 08:51:33 -05:00
2019-04-11 10:00:27 -05:00
error[E0369]: binary operation `>` cannot be applied to type `fn(i64) -> i64 {bar}`
2019-04-22 11:35:37 -05:00
--> $DIR/issue-59488.rs:18:9
2019-04-11 10:00:27 -05:00
|
LL | bar > 13;
| --- ^ -- {integer}
| |
| fn(i64) -> i64 {bar}
| help: you might have forgotten to call this function: `bar( /* arguments */ )`
2019-04-11 10:00:27 -05:00
error[E0308]: mismatched types
2019-04-22 11:35:37 -05:00
--> $DIR/issue-59488.rs:18:11
2019-04-11 10:00:27 -05:00
|
LL | bar > 13;
| ^^ expected fn item, found integer
|
= note: expected type `fn(i64) -> i64 {bar}`
found type `i64`
error[E0369]: binary operation `>` cannot be applied to type `fn() -> i32 {foo}`
2019-04-22 11:35:37 -05:00
--> $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}`
2019-04-22 11:35:37 -05:00
--> $DIR/issue-59488.rs:25:9
|
LL | foo > bar;
| --- ^ --- fn(i64) -> i64 {bar}
| |
| fn() -> i32 {foo}
|
= note: an implementation of `std::cmp::PartialOrd` might be missing for `fn() -> i32 {foo}`
error[E0308]: mismatched types
2019-04-22 11:35:37 -05:00
--> $DIR/issue-59488.rs:25:11
|
LL | foo > bar;
| ^^^ expected fn item, found a different fn item
|
= note: expected type `fn() -> i32 {foo}`
found type `fn(i64) -> i64 {bar}`
2019-04-18 23:34:54 -05:00
error[E0369]: binary operation `==` cannot be applied to type `fn(usize) -> Foo {Foo::Bar}`
2019-04-22 11:35:37 -05:00
--> $DIR/issue-59488.rs:30:5
2019-04-18 23:34:54 -05:00
|
LL | assert_eq!(Foo::Bar, i);
| ^^^^^^^^^^^^^^^^^^^^^^^^
| |
| fn(usize) -> Foo {Foo::Bar}
| fn(usize) -> Foo {Foo::Bar}
|
= note: an implementation of `std::cmp::PartialEq` might be missing for `fn(usize) -> Foo {Foo::Bar}`
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
error[E0277]: `fn(usize) -> Foo {Foo::Bar}` doesn't implement `std::fmt::Debug`
2019-04-22 11:35:37 -05:00
--> $DIR/issue-59488.rs:30:5
2019-04-18 23:34:54 -05:00
|
LL | assert_eq!(Foo::Bar, i);
| ^^^^^^^^^^^^^^^^^^^^^^^^ `fn(usize) -> Foo {Foo::Bar}` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug`
|
= help: the trait `std::fmt::Debug` is not implemented for `fn(usize) -> Foo {Foo::Bar}`
= note: required because of the requirements on the impl of `std::fmt::Debug` for `&fn(usize) -> Foo {Foo::Bar}`
= note: required by `std::fmt::Debug::fmt`
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
error[E0277]: `fn(usize) -> Foo {Foo::Bar}` doesn't implement `std::fmt::Debug`
2019-04-22 11:35:37 -05:00
--> $DIR/issue-59488.rs:30:5
2019-04-18 23:34:54 -05:00
|
LL | assert_eq!(Foo::Bar, i);
| ^^^^^^^^^^^^^^^^^^^^^^^^ `fn(usize) -> Foo {Foo::Bar}` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug`
|
= help: the trait `std::fmt::Debug` is not implemented for `fn(usize) -> Foo {Foo::Bar}`
= note: required because of the requirements on the impl of `std::fmt::Debug` for `&fn(usize) -> Foo {Foo::Bar}`
= note: required by `std::fmt::Debug::fmt`
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
error: aborting due to 10 previous errors
2019-04-07 08:51:33 -05:00
2019-04-18 23:34:54 -05:00
Some errors have detailed explanations: E0277, E0308, E0369.
For more information about an error, try `rustc --explain E0277`.