diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:02:58 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:02:58 +0000 |
commit | 698f8c2f01ea549d77d7dc3338a12e04c11057b9 (patch) | |
tree | 173a775858bd501c378080a10dca74132f05bc50 /src/test/ui/issues/issue-70724-add_type_neq_err_label-unwrap.stderr | |
parent | Initial commit. (diff) | |
download | rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.tar.xz rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.zip |
Adding upstream version 1.64.0+dfsg1.upstream/1.64.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-70724-add_type_neq_err_label-unwrap.stderr | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/test/ui/issues/issue-70724-add_type_neq_err_label-unwrap.stderr b/src/test/ui/issues/issue-70724-add_type_neq_err_label-unwrap.stderr new file mode 100644 index 000000000..c6e6ea1e0 --- /dev/null +++ b/src/test/ui/issues/issue-70724-add_type_neq_err_label-unwrap.stderr @@ -0,0 +1,43 @@ +error[E0369]: binary operation `==` cannot be applied to type `fn() -> i32 {a}` + --> $DIR/issue-70724-add_type_neq_err_label-unwrap.rs:6:5 + | +LL | assert_eq!(a, 0); + | ^^^^^^^^^^^^^^^^ + | | + | fn() -> i32 {a} + | {integer} + | + = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info) +help: you might have forgotten to call this function + --> $SRC_DIR/core/src/macros/mod.rs:LL:COL + | +LL | if !(*left_val() == *right_val) { + | ++ + +error[E0308]: mismatched types + --> $DIR/issue-70724-add_type_neq_err_label-unwrap.rs:6:5 + | +LL | assert_eq!(a, 0); + | ^^^^^^^^^^^^^^^^ expected fn item, found integer + | + = note: expected fn item `fn() -> i32 {a}` + found type `i32` + = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0277]: `fn() -> i32 {a}` doesn't implement `Debug` + --> $DIR/issue-70724-add_type_neq_err_label-unwrap.rs:6:5 + | +LL | fn a() -> i32 { + | - consider calling this function +... +LL | assert_eq!(a, 0); + | ^^^^^^^^^^^^^^^^ `fn() -> i32 {a}` cannot be formatted using `{:?}` because it doesn't implement `Debug` + | + = help: the trait `Debug` is not implemented for `fn() -> i32 {a}` + = help: use parentheses to call the function: `a()` + = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: aborting due to 3 previous errors + +Some errors have detailed explanations: E0277, E0308, E0369. +For more information about an error, try `rustc --explain E0277`. |