]>
Commit | Line | Data |
---|---|---|
487cf647 FG |
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 | } |