From 94a0819fe3a0d679c3042a77bfe6a2afc505daea Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:11:28 +0200 Subject: Adding upstream version 1.66.0+dfsg1. Signed-off-by: Daniel Baumann --- src/test/ui/fn/fn-trait-formatting.stderr | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/test/ui/fn/fn-trait-formatting.stderr') diff --git a/src/test/ui/fn/fn-trait-formatting.stderr b/src/test/ui/fn/fn-trait-formatting.stderr index ea88e401b..2a674d3c1 100644 --- a/src/test/ui/fn/fn-trait-formatting.stderr +++ b/src/test/ui/fn/fn-trait-formatting.stderr @@ -8,6 +8,10 @@ LL | let _: () = Box::new(|_: isize| {}) as Box; | = note: expected unit type `()` found struct `Box` +help: use parentheses to call this trait object + | +LL | let _: () = (Box::new(|_: isize| {}) as Box)(/* isize */); + | + ++++++++++++++ error[E0308]: mismatched types --> $DIR/fn-trait-formatting.rs:10:17 @@ -19,6 +23,10 @@ LL | let _: () = Box::new(|_: isize, isize| {}) as Box | = note: expected unit type `()` found struct `Box` +help: use parentheses to call this trait object + | +LL | let _: () = (Box::new(|_: isize, isize| {}) as Box)(/* isize */, /* isize */); + | + +++++++++++++++++++++++++++ error[E0308]: mismatched types --> $DIR/fn-trait-formatting.rs:14:17 -- cgit v1.2.3