about summary refs log tree commit diff
path: root/src/tools/clippy/tests/ui/coerce_container_to_any.stderr
blob: 26389c9186ebca8953c327162a9124a8a6a67876 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
error: coercing `&std::boxed::Box<dyn std::any::Any>` 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<dyn std::any::Any>` 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<dyn std::any::Any>` 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<dyn std::any::Any>` 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<dyn std::any::Any>` 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