2024-02-16 14:02:50 -06:00
|
|
|
//@ revisions: normal over_aligned
|
2022-11-15 16:26:28 -06:00
|
|
|
|
|
|
|
#![feature(dyn_star)]
|
|
|
|
//~^ WARN the feature `dyn_star` is incomplete and may not be safe to use and/or cause compiler crashes
|
|
|
|
|
|
|
|
use std::fmt::Debug;
|
|
|
|
|
|
|
|
#[cfg_attr(over_aligned, repr(C, align(1024)))]
|
|
|
|
#[cfg_attr(not(over_aligned), repr(C))]
|
|
|
|
#[derive(Debug)]
|
|
|
|
struct AlignedUsize(usize);
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let x = AlignedUsize(12) as dyn* Debug;
|
2023-03-20 15:53:43 -05:00
|
|
|
//~^ ERROR `AlignedUsize` needs to have the same ABI as a pointer
|
2022-11-15 16:26:28 -06:00
|
|
|
}
|