diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-18 02:49:50 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-18 02:49:50 +0000 |
commit | 9835e2ae736235810b4ea1c162ca5e65c547e770 (patch) | |
tree | 3fcebf40ed70e581d776a8a4c65923e8ec20e026 /tests/ui/issues/issue-18107.stderr | |
parent | Releasing progress-linux version 1.70.0+dfsg2-1~progress7.99u1. (diff) | |
download | rustc-9835e2ae736235810b4ea1c162ca5e65c547e770.tar.xz rustc-9835e2ae736235810b4ea1c162ca5e65c547e770.zip |
Merging upstream version 1.71.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/issues/issue-18107.stderr')
-rw-r--r-- | tests/ui/issues/issue-18107.stderr | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/ui/issues/issue-18107.stderr b/tests/ui/issues/issue-18107.stderr index 1669b550a..cf4e06316 100644 --- a/tests/ui/issues/issue-18107.stderr +++ b/tests/ui/issues/issue-18107.stderr @@ -4,14 +4,18 @@ error[E0746]: return type cannot have an unboxed trait object LL | dyn AbstractRenderer | ^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time | -help: use `impl AbstractRenderer` as the return type if all return paths have the same type but you want to expose only the trait in the signature +help: return an `impl Trait` instead of a `dyn Trait`, if all returned values are the same type | LL | impl AbstractRenderer + | ~~~~ +help: box the return type, and wrap all of the returned values in `Box::new` | -help: use a boxed trait object if all return paths implement trait `AbstractRenderer` +LL ~ Box<dyn AbstractRenderer> +LL | +LL | { +LL | match 0 { +LL ~ _ => Box::new(unimplemented!()) | -LL | Box<dyn AbstractRenderer> - | ++++ + error: aborting due to previous error |