summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-59488.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
commit218caa410aa38c29984be31a5229b9fa717560ee (patch)
treec54bd55eeb6e4c508940a30e94c0032fbd45d677 /tests/ui/issues/issue-59488.stderr
parentReleasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz
rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/issues/issue-59488.stderr')
-rw-r--r--tests/ui/issues/issue-59488.stderr127
1 files changed, 127 insertions, 0 deletions
diff --git a/tests/ui/issues/issue-59488.stderr b/tests/ui/issues/issue-59488.stderr
new file mode 100644
index 000000000..f9846b62a
--- /dev/null
+++ b/tests/ui/issues/issue-59488.stderr
@@ -0,0 +1,127 @@
+error[E0369]: binary operation `>` cannot be applied to type `fn() -> i32 {foo}`
+ --> $DIR/issue-59488.rs:14:9
+ |
+LL | foo > 12;
+ | --- ^ -- {integer}
+ | |
+ | fn() -> i32 {foo}
+ |
+help: use parentheses to call this function
+ |
+LL | foo() > 12;
+ | ++
+
+error[E0308]: mismatched types
+ --> $DIR/issue-59488.rs:14:11
+ |
+LL | foo > 12;
+ | ^^ expected fn item, found integer
+ |
+ = note: expected fn item `fn() -> i32 {foo}`
+ found type `i32`
+
+error[E0369]: binary operation `>` cannot be applied to type `fn(i64) -> i64 {bar}`
+ --> $DIR/issue-59488.rs:18:9
+ |
+LL | bar > 13;
+ | --- ^ -- {integer}
+ | |
+ | fn(i64) -> i64 {bar}
+ |
+help: use parentheses to call this function
+ |
+LL | bar(/* i64 */) > 13;
+ | +++++++++++
+
+error[E0308]: mismatched types
+ --> $DIR/issue-59488.rs:18:11
+ |
+LL | bar > 13;
+ | ^^ expected fn item, found integer
+ |
+ = note: expected fn item `fn(i64) -> i64 {bar}`
+ found type `i64`
+
+error[E0369]: binary operation `>` cannot be applied to type `fn() -> i32 {foo}`
+ --> $DIR/issue-59488.rs:22:9
+ |
+LL | foo > foo;
+ | --- ^ --- fn() -> i32 {foo}
+ | |
+ | fn() -> i32 {foo}
+ |
+help: use parentheses to call these
+ |
+LL | foo() > foo();
+ | ++ ++
+
+error[E0369]: binary operation `>` cannot be applied to type `fn() -> i32 {foo}`
+ --> $DIR/issue-59488.rs:25:9
+ |
+LL | foo > bar;
+ | --- ^ --- fn(i64) -> i64 {bar}
+ | |
+ | fn() -> i32 {foo}
+
+error[E0308]: mismatched types
+ --> $DIR/issue-59488.rs:25:11
+ |
+LL | foo > bar;
+ | ^^^ expected fn item, found a different fn item
+ |
+ = note: expected fn item `fn() -> i32 {foo}`
+ found fn item `fn(i64) -> i64 {bar}`
+
+error[E0369]: binary operation `==` cannot be applied to type `fn(usize) -> Foo {Foo::Bar}`
+ --> $DIR/issue-59488.rs:30:5
+ |
+LL | assert_eq!(Foo::Bar, i);
+ | ^^^^^^^^^^^^^^^^^^^^^^^
+ | |
+ | fn(usize) -> Foo {Foo::Bar}
+ | fn(usize) -> Foo {Foo::Bar}
+ |
+ = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error[E0277]: `fn(usize) -> Foo {Foo::Bar}` doesn't implement `Debug`
+ --> $DIR/issue-59488.rs:30:5
+ |
+LL | assert_eq!(Foo::Bar, i);
+ | ^^^^^^^^^^^^^^^^^^^^^^^ `fn(usize) -> Foo {Foo::Bar}` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+ |
+ = help: the trait `Debug` is not implemented for fn item `fn(usize) -> Foo {Foo::Bar}`
+ = help: the following other types implement trait `Debug`:
+ extern "C" fn() -> Ret
+ extern "C" fn(A, B) -> Ret
+ extern "C" fn(A, B, ...) -> Ret
+ extern "C" fn(A, B, C) -> Ret
+ extern "C" fn(A, B, C, ...) -> Ret
+ extern "C" fn(A, B, C, D) -> Ret
+ extern "C" fn(A, B, C, D, ...) -> Ret
+ extern "C" fn(A, B, C, D, E) -> Ret
+ and 118 others
+ = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error[E0277]: `fn(usize) -> Foo {Foo::Bar}` doesn't implement `Debug`
+ --> $DIR/issue-59488.rs:30:5
+ |
+LL | assert_eq!(Foo::Bar, i);
+ | ^^^^^^^^^^^^^^^^^^^^^^^ `fn(usize) -> Foo {Foo::Bar}` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+ |
+ = help: the trait `Debug` is not implemented for fn item `fn(usize) -> Foo {Foo::Bar}`
+ = help: the following other types implement trait `Debug`:
+ extern "C" fn() -> Ret
+ extern "C" fn(A, B) -> Ret
+ extern "C" fn(A, B, ...) -> Ret
+ extern "C" fn(A, B, C) -> Ret
+ extern "C" fn(A, B, C, ...) -> Ret
+ extern "C" fn(A, B, C, D) -> Ret
+ extern "C" fn(A, B, C, D, ...) -> Ret
+ extern "C" fn(A, B, C, D, E) -> Ret
+ and 118 others
+ = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error: aborting due to 10 previous errors
+
+Some errors have detailed explanations: E0277, E0308, E0369.
+For more information about an error, try `rustc --explain E0277`.