From 4547b622d8d29df964fa2914213088b148c498fc Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:18:32 +0200 Subject: Merging upstream version 1.67.1+dfsg1. Signed-off-by: Daniel Baumann --- src/test/ui/static/issue-5216.stderr | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/test/ui/static/issue-5216.stderr (limited to 'src/test/ui/static/issue-5216.stderr') diff --git a/src/test/ui/static/issue-5216.stderr b/src/test/ui/static/issue-5216.stderr new file mode 100644 index 000000000..1afff28f0 --- /dev/null +++ b/src/test/ui/static/issue-5216.stderr @@ -0,0 +1,28 @@ +error[E0308]: mismatched types + --> $DIR/issue-5216.rs:3:21 + | +LL | pub static C: S = S(f); + | - ^ expected struct `Box`, found fn item + | | + | arguments to this struct are incorrect + | + = note: expected struct `Box<(dyn FnMut() + Sync + 'static)>` + found fn item `fn() {f}` +note: tuple struct defined here + --> $DIR/issue-5216.rs:2:8 + | +LL | struct S(Box); + | ^ + +error[E0308]: mismatched types + --> $DIR/issue-5216.rs:8:19 + | +LL | pub static D: T = g; + | ^ expected struct `Box`, found fn item + | + = note: expected struct `Box<(dyn FnMut() + Sync + 'static)>` + found fn item `fn() {g}` + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0308`. -- cgit v1.2.3