2014-09-27 19:22:32 +00:00
|
|
|
fn main() {
|
2015-02-18 10:42:01 +00:00
|
|
|
let _foo = &[1_usize, 2] as [usize];
|
2014-12-06 02:12:25 +00:00
|
|
|
//~^ ERROR cast to unsized type: `&[usize; 2]` as `[usize]`
|
2015-02-15 08:52:21 +00:00
|
|
|
|
2019-05-28 18:46:13 +00:00
|
|
|
let _bar = Box::new(1_usize) as dyn std::fmt::Debug;
|
2020-09-02 07:40:56 +00:00
|
|
|
//~^ ERROR cast to unsized type: `Box<usize>` as `dyn Debug`
|
2015-02-15 08:52:21 +00:00
|
|
|
|
2019-05-28 18:46:13 +00:00
|
|
|
let _baz = 1_usize as dyn std::fmt::Debug;
|
2020-09-02 07:40:56 +00:00
|
|
|
//~^ ERROR cast to unsized type: `usize` as `dyn Debug`
|
2015-02-15 08:52:21 +00:00
|
|
|
|
2015-02-18 10:42:01 +00:00
|
|
|
let _quux = [1_usize, 2] as [usize];
|
2014-12-06 02:12:25 +00:00
|
|
|
//~^ ERROR cast to unsized type: `[usize; 2]` as `[usize]`
|
2014-09-27 19:22:32 +00:00
|
|
|
}
|