2015-09-25 15:25:59 +09:00
|
|
|
#![feature(repr_simd)]
|
|
|
|
|
|
2020-09-10 19:54:17 +01:00
|
|
|
#[repr(C)] //~ ERROR: attribute should be applied to a struct, enum, or union
|
2015-09-25 15:25:59 +09:00
|
|
|
fn f() {}
|
|
|
|
|
|
|
|
|
|
#[repr(C)]
|
|
|
|
|
struct SExtern(f64, f64);
|
|
|
|
|
|
|
|
|
|
#[repr(packed)]
|
|
|
|
|
struct SPacked(f64, f64);
|
|
|
|
|
|
|
|
|
|
#[repr(simd)]
|
2024-08-22 01:28:20 -07:00
|
|
|
struct SSimd([f64; 2]);
|
2015-09-25 15:25:59 +09:00
|
|
|
|
2020-09-10 19:54:17 +01:00
|
|
|
#[repr(i8)] //~ ERROR: attribute should be applied to an enum
|
2015-09-25 15:25:59 +09:00
|
|
|
struct SInt(f64, f64);
|
|
|
|
|
|
|
|
|
|
#[repr(C)]
|
2024-12-05 15:32:12 +01:00
|
|
|
enum EExtern {
|
|
|
|
|
A,
|
|
|
|
|
B,
|
|
|
|
|
}
|
2015-09-25 15:25:59 +09:00
|
|
|
|
2019-01-30 14:14:16 +01:00
|
|
|
#[repr(align(8))]
|
2024-12-05 15:32:12 +01:00
|
|
|
enum EAlign {
|
|
|
|
|
A,
|
|
|
|
|
B,
|
|
|
|
|
}
|
2017-01-15 09:49:29 +11:00
|
|
|
|
2020-09-10 19:54:17 +01:00
|
|
|
#[repr(packed)] //~ ERROR: attribute should be applied to a struct
|
2024-12-05 15:32:12 +01:00
|
|
|
enum EPacked {
|
|
|
|
|
A,
|
|
|
|
|
B,
|
|
|
|
|
}
|
2015-09-25 15:25:59 +09:00
|
|
|
|
2020-09-10 19:54:17 +01:00
|
|
|
#[repr(simd)] //~ ERROR: attribute should be applied to a struct
|
2024-12-05 15:32:12 +01:00
|
|
|
enum ESimd {
|
|
|
|
|
A,
|
|
|
|
|
B,
|
|
|
|
|
}
|
2015-09-25 15:25:59 +09:00
|
|
|
|
|
|
|
|
#[repr(i8)]
|
2024-12-05 15:32:12 +01:00
|
|
|
enum EInt {
|
|
|
|
|
A,
|
|
|
|
|
B,
|
|
|
|
|
}
|
|
|
|
|
|
2025-06-09 20:08:52 +02:00
|
|
|
#[repr()] //~ ERROR attribute should be applied to a struct, enum, or union [E0517]
|
2024-12-05 15:32:12 +01:00
|
|
|
type SirThisIsAType = i32;
|
|
|
|
|
|
|
|
|
|
#[repr()]
|
|
|
|
|
struct EmptyReprArgumentList(i32);
|
2015-09-25 15:25:59 +09:00
|
|
|
|
|
|
|
|
fn main() {}
|