]> git.lizzy.rs Git - rust.git/blob - src/test/ui/dyn-star/align.rs
Auto merge of #103390 - compiler-errors:metadata-mod-regions, r=eholk
[rust.git] / src / test / ui / dyn-star / align.rs
1 // revisions: normal over_aligned
2 //[normal] check-pass
3
4 #![feature(dyn_star)]
5 //~^ WARN the feature `dyn_star` is incomplete and may not be safe to use and/or cause compiler crashes
6
7 use std::fmt::Debug;
8
9 #[cfg_attr(over_aligned,      repr(C, align(1024)))]
10 #[cfg_attr(not(over_aligned), repr(C))]
11 #[derive(Debug)]
12 struct AlignedUsize(usize);
13
14 fn main() {
15     let x = AlignedUsize(12) as dyn* Debug;
16     //[over_aligned]~^ ERROR `AlignedUsize` needs to be a pointer-sized type
17 }