error: coercing `&std::boxed::Box` to `&dyn Any` --> tests/ui/coerce_container_to_any.rs:9:7 | LL | f(&x); | ^^ help: consider dereferencing: `&*x` | = note: `-D clippy::coerce-container-to-any` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::coerce_container_to_any)]` error: coercing `&std::boxed::Box` to `&dyn Any` --> tests/ui/coerce_container_to_any.rs:12:7 | LL | f(ref_x); | ^^^^^ help: consider dereferencing: `&**ref_x` error: coercing `&std::boxed::Box` to `&dyn Any` --> tests/ui/coerce_container_to_any.rs:15:23 | LL | let _: &dyn Any = &x; | ^^ help: consider dereferencing: `&*x` error: coercing `&mut std::boxed::Box` to `&dyn Any` --> tests/ui/coerce_container_to_any.rs:18:23 | LL | let _: &dyn Any = &mut x; | ^^^^^^ help: consider dereferencing: `&*x` error: coercing `&mut std::boxed::Box` to `&mut dyn Any` --> tests/ui/coerce_container_to_any.rs:21:27 | LL | let _: &mut dyn Any = &mut x; | ^^^^^^ help: consider dereferencing: `&mut *x` error: aborting due to 5 previous errors