rust/tests/ui/dyn-star/check-size-at-cast.rs

11 lines
224 B
Rust
Raw Normal View History

#![feature(dyn_star)]
#![allow(incomplete_features)]
use std::fmt::Debug;
fn main() {
let i = [1, 2, 3, 4] as dyn* Debug;
2023-02-07 12:02:20 -06:00
//~^ ERROR `[i32; 4]` needs to have the same alignment and size as a pointer
dbg!(i);
}