]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-18107.stderr
:arrow_up: rust-analyzer
[rust.git] / src / test / ui / issues / issue-18107.stderr
1 error[E0746]: return type cannot have an unboxed trait object
2   --> $DIR/issue-18107.rs:4:5
3    |
4 LL |     dyn AbstractRenderer
5    |     ^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
6    |
7 help: use some type `T` that is `T: Sized` as the return type if all return paths have the same type
8    |
9 LL |     T
10    |
11 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
12    |
13 LL |     impl AbstractRenderer
14    |
15 help: use a boxed trait object if all return paths implement trait `AbstractRenderer`
16    |
17 LL |     Box<dyn AbstractRenderer>
18    |     ++++                    +
19
20 error: aborting due to previous error
21
22 For more information about this error, try `rustc --explain E0746`.