fork/rust
git clone https://git.julia.blue/fork/rust
b8cedc00407
1.42.0
1error[E0746]: return type cannot have an unboxed trait object 2 --> $DIR/E0746.rs:8:13 3 | 4LL | fn foo() -> dyn Trait { Struct } 5 | ^^^^^^^^^ doesn't have a size known at compile-time 6 | 7 = note: for information on `impl Trait`, see <https://doc.rust-lang.org/book/ch10-02-traits.html#returning-types-that-implement-traits> 8help: return `impl Trait` instead, as all return paths are of type `Struct`, which implements `Trait` 9 | 10LL | fn foo() -> impl Trait { Struct } 11 | ^^^^^^^^^^ 12 13error[E0746]: return type cannot have an unboxed trait object 14 --> $DIR/E0746.rs:11:13 15 | 16LL | fn bar() -> dyn Trait { 17 | ^^^^^^^^^ doesn't have a size known at compile-time 18 | 19 = note: for information on `impl Trait`, see <https://doc.rust-lang.org/book/ch10-02-traits.html#returning-types-that-implement-traits> 20help: return `impl Trait` instead, as all return paths are of type `{integer}`, which implements `Trait` 21 | 22LL | fn bar() -> impl Trait { 23 | ^^^^^^^^^^ 24 25error: aborting due to 2 previous errors 26 27For more information about this error, try `rustc --explain E0746`.