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 --- .../closure-return-type-must-be-sized.stderr | 99 ++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 src/test/ui/closures/closure-return-type-must-be-sized.stderr (limited to 'src/test/ui/closures/closure-return-type-must-be-sized.stderr') diff --git a/src/test/ui/closures/closure-return-type-must-be-sized.stderr b/src/test/ui/closures/closure-return-type-must-be-sized.stderr new file mode 100644 index 000000000..b07425bd8 --- /dev/null +++ b/src/test/ui/closures/closure-return-type-must-be-sized.stderr @@ -0,0 +1,99 @@ +error[E0277]: the size for values of type `dyn A` cannot be known at compilation time + --> $DIR/closure-return-type-must-be-sized.rs:54:5 + | +LL | a::foo:: dyn A>(); + | ^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time + | + = help: within `fn() -> dyn A`, the trait `Sized` is not implemented for `dyn A` + = note: required because it appears within the type `fn() -> dyn A` + +error[E0277]: the size for values of type `dyn A` cannot be known at compilation time + --> $DIR/closure-return-type-must-be-sized.rs:55:14 + | +LL | a::bar:: dyn A, _>(); + | ^^^^^^^^^^^^^ doesn't have a size known at compile-time + | + = help: within `fn() -> dyn A`, the trait `Sized` is not implemented for `dyn A` + = note: required because it appears within the type `fn() -> dyn A` +note: required by a bound in `a::bar` + --> $DIR/closure-return-type-must-be-sized.rs:14:19 + | +LL | pub fn bar R, R: ?Sized>() {} + | ^^^^^^^^^^^^^ required by this bound in `a::bar` + +error[E0277]: the size for values of type `dyn A` cannot be known at compilation time + --> $DIR/closure-return-type-must-be-sized.rs:56:5 + | +LL | a::baz:: dyn A>(); + | ^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time + | + = help: within `fn() -> dyn A`, the trait `Sized` is not implemented for `dyn A` + = note: required because it appears within the type `fn() -> dyn A` + +error[E0277]: the size for values of type `dyn A` cannot be known at compilation time + --> $DIR/closure-return-type-must-be-sized.rs:61:5 + | +LL | b::foo:: dyn A>(); + | ^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time + | + = help: within `fn() -> dyn A`, the trait `Sized` is not implemented for `dyn A` + = note: required because it appears within the type `fn() -> dyn A` + +error[E0277]: the size for values of type `dyn A` cannot be known at compilation time + --> $DIR/closure-return-type-must-be-sized.rs:62:14 + | +LL | b::bar:: dyn A, _>(); + | ^^^^^^^^^^^^^ doesn't have a size known at compile-time + | + = help: within `fn() -> dyn A`, the trait `Sized` is not implemented for `dyn A` + = note: required because it appears within the type `fn() -> dyn A` +note: required by a bound in `b::bar` + --> $DIR/closure-return-type-must-be-sized.rs:28:19 + | +LL | pub fn bar R, R: ?Sized>() {} + | ^^^^^^^^^ required by this bound in `b::bar` + +error[E0277]: the size for values of type `dyn A` cannot be known at compilation time + --> $DIR/closure-return-type-must-be-sized.rs:63:5 + | +LL | b::baz:: dyn A>(); + | ^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time + | + = help: within `fn() -> dyn A`, the trait `Sized` is not implemented for `dyn A` + = note: required because it appears within the type `fn() -> dyn A` + +error[E0277]: the size for values of type `dyn A` cannot be known at compilation time + --> $DIR/closure-return-type-must-be-sized.rs:68:5 + | +LL | c::foo:: dyn A>(); + | ^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time + | + = help: within `fn() -> dyn A`, the trait `Sized` is not implemented for `dyn A` + = note: required because it appears within the type `fn() -> dyn A` + +error[E0277]: the size for values of type `dyn A` cannot be known at compilation time + --> $DIR/closure-return-type-must-be-sized.rs:69:14 + | +LL | c::bar:: dyn A, _>(); + | ^^^^^^^^^^^^^ doesn't have a size known at compile-time + | + = help: within `fn() -> dyn A`, the trait `Sized` is not implemented for `dyn A` + = note: required because it appears within the type `fn() -> dyn A` +note: required by a bound in `c::bar` + --> $DIR/closure-return-type-must-be-sized.rs:42:19 + | +LL | pub fn bar R, R: ?Sized>() {} + | ^^^^^^^^^^^^ required by this bound in `c::bar` + +error[E0277]: the size for values of type `dyn A` cannot be known at compilation time + --> $DIR/closure-return-type-must-be-sized.rs:70:5 + | +LL | c::baz:: dyn A>(); + | ^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time + | + = help: within `fn() -> dyn A`, the trait `Sized` is not implemented for `dyn A` + = note: required because it appears within the type `fn() -> dyn A` + +error: aborting due to 9 previous errors + +For more information about this error, try `rustc --explain E0277`. -- cgit v1.2.3