fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
656 B22 linesraw
1error[E0746]: return type cannot have an unboxed trait object
2  --> $DIR/issue-18107.rs:4:5
3   |
4LL |     dyn AbstractRenderer
5   |     ^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
6   |
7help: return an `impl Trait` instead of a `dyn Trait`, if all returned values are the same type
8   |
9LL |     impl AbstractRenderer
10   |     ~~~~
11help: box the return type, and wrap all of the returned values in `Box::new`
12   |
13LL ~     Box<dyn AbstractRenderer>
14LL |
15LL | {
16LL |     match 0 {
17LL ~         _ => Box::new(unimplemented!())
18   |
19
20error: aborting due to previous error
21
22For more information about this error, try `rustc --explain E0746`.