]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-17441.stderr
Add 'src/tools/rustfmt/' from commit '7872306edf2e11a69aaffb9434088fd66b46a863'
[rust.git] / src / test / ui / issues / issue-17441.stderr
1 error[E0620]: cast to unsized type: `&[usize; 2]` as `[usize]`
2   --> $DIR/issue-17441.rs:2:16
3    |
4 LL |     let _foo = &[1_usize, 2] as [usize];
5    |                ^^^^^^^^^^^^^^^^^^^^^^^^
6    |
7 help: consider using an implicit coercion to `&[usize]` instead
8   --> $DIR/issue-17441.rs:2:16
9    |
10 LL |     let _foo = &[1_usize, 2] as [usize];
11    |                ^^^^^^^^^^^^^^^^^^^^^^^^
12
13 error[E0620]: cast to unsized type: `Box<usize>` as `dyn Debug`
14   --> $DIR/issue-17441.rs:5:16
15    |
16 LL |     let _bar = Box::new(1_usize) as dyn std::fmt::Debug;
17    |                ^^^^^^^^^^^^^^^^^^^^^-------------------
18    |                                     |
19    |                                     help: you can cast to a `Box` instead: `Box<dyn std::fmt::Debug>`
20
21 error[E0620]: cast to unsized type: `usize` as `dyn Debug`
22   --> $DIR/issue-17441.rs:8:16
23    |
24 LL |     let _baz = 1_usize as dyn std::fmt::Debug;
25    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
26    |
27 help: consider using a box or reference as appropriate
28   --> $DIR/issue-17441.rs:8:16
29    |
30 LL |     let _baz = 1_usize as dyn std::fmt::Debug;
31    |                ^^^^^^^
32
33 error[E0620]: cast to unsized type: `[usize; 2]` as `[usize]`
34   --> $DIR/issue-17441.rs:11:17
35    |
36 LL |     let _quux = [1_usize, 2] as [usize];
37    |                 ^^^^^^^^^^^^^^^^^^^^^^^
38    |
39 help: consider using a box or reference as appropriate
40   --> $DIR/issue-17441.rs:11:17
41    |
42 LL |     let _quux = [1_usize, 2] as [usize];
43    |                 ^^^^^^^^^^^^
44
45 error: aborting due to 4 previous errors
46
47 For more information about this error, try `rustc --explain E0620`.