error: boxed return of the sized type `usize` --> $DIR/unnecessary_box_returns.rs:5:22 | LL | fn baz(&self) -> Box; | ^^^^^^^^^^ help: try: `usize` | = help: changing this also requires a change to the return expressions in this function = note: `-D clippy::unnecessary-box-returns` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::unnecessary_box_returns)]` error: boxed return of the sized type `usize` --> $DIR/unnecessary_box_returns.rs:19:22 | LL | fn baz(&self) -> Box { | ^^^^^^^^^^ help: try: `usize` | = help: changing this also requires a change to the return expressions in this function error: boxed return of the sized type `usize` --> $DIR/unnecessary_box_returns.rs:27:20 | LL | fn bxed_usize() -> Box { | ^^^^^^^^^^ help: try: `usize` | = help: changing this also requires a change to the return expressions in this function error: boxed return of the sized type `Foo` --> $DIR/unnecessary_box_returns.rs:33:19 | LL | fn _bxed_foo() -> Box { | ^^^^^^^^ help: try: `Foo` | = help: changing this also requires a change to the return expressions in this function error: aborting due to 4 previous errors