2014-09-27 14:22:32 -05:00
|
|
|
fn main() {
|
2015-02-18 04:42:01 -06:00
|
|
|
let _foo = &[1_usize, 2] as [usize];
|
2014-12-05 20:12:25 -06:00
|
|
|
//~^ ERROR cast to unsized type: `&[usize; 2]` as `[usize]`
|
2015-02-15 02:52:21 -06:00
|
|
|
|
|
|
|
let _bar = Box::new(1_usize) as std::fmt::Debug;
|
2018-05-26 22:51:50 -05:00
|
|
|
//~^ ERROR cast to unsized type: `std::boxed::Box<usize>` as `dyn std::fmt::Debug`
|
2015-02-15 02:52:21 -06:00
|
|
|
|
2015-02-21 05:28:28 -06:00
|
|
|
let _baz = 1_usize as std::fmt::Debug;
|
2018-05-26 22:51:50 -05:00
|
|
|
//~^ ERROR cast to unsized type: `usize` as `dyn std::fmt::Debug`
|
2015-02-15 02:52:21 -06:00
|
|
|
|
2015-02-18 04:42:01 -06:00
|
|
|
let _quux = [1_usize, 2] as [usize];
|
2014-12-05 20:12:25 -06:00
|
|
|
//~^ ERROR cast to unsized type: `[usize; 2]` as `[usize]`
|
2014-09-27 14:22:32 -05:00
|
|
|
}
|