summaryrefslogtreecommitdiffstats
path: root/tests/ui/issues/issue-18107.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/issues/issue-18107.stderr')
-rw-r--r--tests/ui/issues/issue-18107.stderr12
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