rust/tests/ui/cast/unsized-struct-cast.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

7 lines
146 B
Rust
Raw Normal View History

2023-09-22 10:31:26 +00:00
pub struct Data([u8]);
fn main(){
const _: *const Data = &[] as *const Data;
//~^ ERROR: casting `&[_; 0]` as `*const Data` is invalid
}