1019 lines
36 KiB
Text
1019 lines
36 KiB
Text
error: `#[rustc_abi]` attribute cannot be used on constants
|
|
--> $DIR/debug.rs:42:1
|
|
|
|
|
LL | #[rustc_abi(debug)]
|
|
| ^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: `#[rustc_abi]` can be applied to functions and type aliases
|
|
|
|
error: `#[rustc_abi]` attribute cannot be used on associated consts
|
|
--> $DIR/debug.rs:46:5
|
|
|
|
|
LL | #[rustc_abi(debug)]
|
|
| ^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: `#[rustc_abi]` can be applied to functions and type aliases
|
|
|
|
error[E0539]: malformed `rustc_abi` attribute input
|
|
--> $DIR/debug.rs:74:1
|
|
|
|
|
LL | #[rustc_abi("assert_eq")]
|
|
| ^^^^^^^^^^^-------------^
|
|
| |
|
|
| valid arguments are `assert_eq` or `debug`
|
|
|
|
|
help: try changing it to one of the following valid forms of the attribute
|
|
|
|
|
LL - #[rustc_abi("assert_eq")]
|
|
LL + #[rustc_abi(assert_eq)]
|
|
|
|
|
LL - #[rustc_abi("assert_eq")]
|
|
LL + #[rustc_abi(debug)]
|
|
|
|
|
|
|
error: fn_abi_of(test) = FnAbi {
|
|
args: [
|
|
ArgAbi {
|
|
layout: TyAndLayout {
|
|
ty: u8,
|
|
layout: Layout {
|
|
size: Size(1 bytes),
|
|
align: AbiAlign {
|
|
abi: $SOME_ALIGN,
|
|
},
|
|
backend_repr: Scalar(
|
|
Initialized {
|
|
value: Int(
|
|
I8,
|
|
false,
|
|
),
|
|
valid_range: 0..=255,
|
|
},
|
|
),
|
|
fields: Primitive,
|
|
largest_niche: None,
|
|
uninhabited: false,
|
|
variants: Single {
|
|
index: 0,
|
|
},
|
|
max_repr_align: None,
|
|
unadjusted_abi_align: $SOME_ALIGN,
|
|
randomization_seed: $SEED,
|
|
},
|
|
},
|
|
mode: Direct(
|
|
ArgAttributes {
|
|
regular: NoUndef,
|
|
arg_ext: None,
|
|
pointee_size: Size(0 bytes),
|
|
pointee_align: None,
|
|
},
|
|
),
|
|
},
|
|
],
|
|
ret: ArgAbi {
|
|
layout: TyAndLayout {
|
|
ty: bool,
|
|
layout: Layout {
|
|
size: Size(1 bytes),
|
|
align: AbiAlign {
|
|
abi: $SOME_ALIGN,
|
|
},
|
|
backend_repr: Scalar(
|
|
Initialized {
|
|
value: Int(
|
|
I8,
|
|
false,
|
|
),
|
|
valid_range: 0..=1,
|
|
},
|
|
),
|
|
fields: Primitive,
|
|
largest_niche: Some(
|
|
Niche {
|
|
offset: Size(0 bytes),
|
|
value: Int(
|
|
I8,
|
|
false,
|
|
),
|
|
valid_range: 0..=1,
|
|
},
|
|
),
|
|
uninhabited: false,
|
|
variants: Single {
|
|
index: 0,
|
|
},
|
|
max_repr_align: None,
|
|
unadjusted_abi_align: $SOME_ALIGN,
|
|
randomization_seed: $SEED,
|
|
},
|
|
},
|
|
mode: Direct(
|
|
ArgAttributes {
|
|
regular: NoUndef,
|
|
arg_ext: Zext,
|
|
pointee_size: Size(0 bytes),
|
|
pointee_align: None,
|
|
},
|
|
),
|
|
},
|
|
c_variadic: false,
|
|
fixed_count: 1,
|
|
conv: Rust,
|
|
can_unwind: $SOME_BOOL,
|
|
}
|
|
--> $DIR/debug.rs:31:1
|
|
|
|
|
LL | fn test(_x: u8) -> bool {
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: fn_abi_of(TestFnPtr) = FnAbi {
|
|
args: [
|
|
ArgAbi {
|
|
layout: TyAndLayout {
|
|
ty: bool,
|
|
layout: Layout {
|
|
size: Size(1 bytes),
|
|
align: AbiAlign {
|
|
abi: $SOME_ALIGN,
|
|
},
|
|
backend_repr: Scalar(
|
|
Initialized {
|
|
value: Int(
|
|
I8,
|
|
false,
|
|
),
|
|
valid_range: 0..=1,
|
|
},
|
|
),
|
|
fields: Primitive,
|
|
largest_niche: Some(
|
|
Niche {
|
|
offset: Size(0 bytes),
|
|
value: Int(
|
|
I8,
|
|
false,
|
|
),
|
|
valid_range: 0..=1,
|
|
},
|
|
),
|
|
uninhabited: false,
|
|
variants: Single {
|
|
index: 0,
|
|
},
|
|
max_repr_align: None,
|
|
unadjusted_abi_align: $SOME_ALIGN,
|
|
randomization_seed: $SEED,
|
|
},
|
|
},
|
|
mode: Direct(
|
|
ArgAttributes {
|
|
regular: NoUndef,
|
|
arg_ext: Zext,
|
|
pointee_size: Size(0 bytes),
|
|
pointee_align: None,
|
|
},
|
|
),
|
|
},
|
|
],
|
|
ret: ArgAbi {
|
|
layout: TyAndLayout {
|
|
ty: u8,
|
|
layout: Layout {
|
|
size: Size(1 bytes),
|
|
align: AbiAlign {
|
|
abi: $SOME_ALIGN,
|
|
},
|
|
backend_repr: Scalar(
|
|
Initialized {
|
|
value: Int(
|
|
I8,
|
|
false,
|
|
),
|
|
valid_range: 0..=255,
|
|
},
|
|
),
|
|
fields: Primitive,
|
|
largest_niche: None,
|
|
uninhabited: false,
|
|
variants: Single {
|
|
index: 0,
|
|
},
|
|
max_repr_align: None,
|
|
unadjusted_abi_align: $SOME_ALIGN,
|
|
randomization_seed: $SEED,
|
|
},
|
|
},
|
|
mode: Direct(
|
|
ArgAttributes {
|
|
regular: NoUndef,
|
|
arg_ext: None,
|
|
pointee_size: Size(0 bytes),
|
|
pointee_align: None,
|
|
},
|
|
),
|
|
},
|
|
c_variadic: false,
|
|
fixed_count: 1,
|
|
conv: Rust,
|
|
can_unwind: $SOME_BOOL,
|
|
}
|
|
--> $DIR/debug.rs:37:1
|
|
|
|
|
LL | type TestFnPtr = fn(bool) -> u8;
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
error: fn_abi_of(test_generic) = FnAbi {
|
|
args: [
|
|
ArgAbi {
|
|
layout: TyAndLayout {
|
|
ty: *const T,
|
|
layout: Layout {
|
|
size: $SOME_SIZE,
|
|
align: AbiAlign {
|
|
abi: $SOME_ALIGN,
|
|
},
|
|
backend_repr: Scalar(
|
|
Initialized {
|
|
value: Pointer(
|
|
AddressSpace(
|
|
0,
|
|
),
|
|
),
|
|
valid_range: $FULL,
|
|
},
|
|
),
|
|
fields: Primitive,
|
|
largest_niche: None,
|
|
uninhabited: false,
|
|
variants: Single {
|
|
index: 0,
|
|
},
|
|
max_repr_align: None,
|
|
unadjusted_abi_align: $SOME_ALIGN,
|
|
randomization_seed: $SEED,
|
|
},
|
|
},
|
|
mode: Direct(
|
|
ArgAttributes {
|
|
regular: NoUndef,
|
|
arg_ext: None,
|
|
pointee_size: Size(0 bytes),
|
|
pointee_align: None,
|
|
},
|
|
),
|
|
},
|
|
],
|
|
ret: ArgAbi {
|
|
layout: TyAndLayout {
|
|
ty: (),
|
|
layout: Layout {
|
|
size: Size(0 bytes),
|
|
align: AbiAlign {
|
|
abi: $SOME_ALIGN,
|
|
},
|
|
backend_repr: Memory {
|
|
sized: true,
|
|
},
|
|
fields: Arbitrary {
|
|
offsets: [],
|
|
in_memory_order: [],
|
|
},
|
|
largest_niche: None,
|
|
uninhabited: false,
|
|
variants: Single {
|
|
index: 0,
|
|
},
|
|
max_repr_align: None,
|
|
unadjusted_abi_align: $SOME_ALIGN,
|
|
randomization_seed: $SEED,
|
|
},
|
|
},
|
|
mode: Ignore,
|
|
},
|
|
c_variadic: false,
|
|
fixed_count: 1,
|
|
conv: Rust,
|
|
can_unwind: $SOME_BOOL,
|
|
}
|
|
--> $DIR/debug.rs:40:1
|
|
|
|
|
LL | fn test_generic<T>(_x: *const T) {}
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: `#[rustc_abi]` can only be applied to function items, type aliases, and associated functions
|
|
--> $DIR/debug.rs:43:1
|
|
|
|
|
LL | const C: () = ();
|
|
| ^^^^^^^^^^^
|
|
|
|
error: ABIs are not compatible
|
|
left ABI = FnAbi {
|
|
args: [
|
|
ArgAbi {
|
|
layout: TyAndLayout {
|
|
ty: u8,
|
|
layout: Layout {
|
|
size: Size(1 bytes),
|
|
align: AbiAlign {
|
|
abi: $SOME_ALIGN,
|
|
},
|
|
backend_repr: Scalar(
|
|
Initialized {
|
|
value: Int(
|
|
I8,
|
|
false,
|
|
),
|
|
valid_range: 0..=255,
|
|
},
|
|
),
|
|
fields: Primitive,
|
|
largest_niche: None,
|
|
uninhabited: false,
|
|
variants: Single {
|
|
index: 0,
|
|
},
|
|
max_repr_align: None,
|
|
unadjusted_abi_align: $SOME_ALIGN,
|
|
randomization_seed: $SEED,
|
|
},
|
|
},
|
|
mode: Direct(
|
|
ArgAttributes {
|
|
regular: NoUndef,
|
|
arg_ext: None,
|
|
pointee_size: Size(0 bytes),
|
|
pointee_align: None,
|
|
},
|
|
),
|
|
},
|
|
],
|
|
ret: ArgAbi {
|
|
layout: TyAndLayout {
|
|
ty: (),
|
|
layout: Layout {
|
|
size: Size(0 bytes),
|
|
align: AbiAlign {
|
|
abi: $SOME_ALIGN,
|
|
},
|
|
backend_repr: Memory {
|
|
sized: true,
|
|
},
|
|
fields: Arbitrary {
|
|
offsets: [],
|
|
in_memory_order: [],
|
|
},
|
|
largest_niche: None,
|
|
uninhabited: false,
|
|
variants: Single {
|
|
index: 0,
|
|
},
|
|
max_repr_align: None,
|
|
unadjusted_abi_align: $SOME_ALIGN,
|
|
randomization_seed: $SEED,
|
|
},
|
|
},
|
|
mode: Ignore,
|
|
},
|
|
c_variadic: false,
|
|
fixed_count: 1,
|
|
conv: Rust,
|
|
can_unwind: $SOME_BOOL,
|
|
}
|
|
right ABI = FnAbi {
|
|
args: [
|
|
ArgAbi {
|
|
layout: TyAndLayout {
|
|
ty: u32,
|
|
layout: Layout {
|
|
size: $SOME_SIZE,
|
|
align: AbiAlign {
|
|
abi: $SOME_ALIGN,
|
|
},
|
|
backend_repr: Scalar(
|
|
Initialized {
|
|
value: Int(
|
|
I32,
|
|
false,
|
|
),
|
|
valid_range: $FULL,
|
|
},
|
|
),
|
|
fields: Primitive,
|
|
largest_niche: None,
|
|
uninhabited: false,
|
|
variants: Single {
|
|
index: 0,
|
|
},
|
|
max_repr_align: None,
|
|
unadjusted_abi_align: $SOME_ALIGN,
|
|
randomization_seed: $SEED,
|
|
},
|
|
},
|
|
mode: Direct(
|
|
ArgAttributes {
|
|
regular: NoUndef,
|
|
arg_ext: None,
|
|
pointee_size: Size(0 bytes),
|
|
pointee_align: None,
|
|
},
|
|
),
|
|
},
|
|
],
|
|
ret: ArgAbi {
|
|
layout: TyAndLayout {
|
|
ty: (),
|
|
layout: Layout {
|
|
size: Size(0 bytes),
|
|
align: AbiAlign {
|
|
abi: $SOME_ALIGN,
|
|
},
|
|
backend_repr: Memory {
|
|
sized: true,
|
|
},
|
|
fields: Arbitrary {
|
|
offsets: [],
|
|
in_memory_order: [],
|
|
},
|
|
largest_niche: None,
|
|
uninhabited: false,
|
|
variants: Single {
|
|
index: 0,
|
|
},
|
|
max_repr_align: None,
|
|
unadjusted_abi_align: $SOME_ALIGN,
|
|
randomization_seed: $SEED,
|
|
},
|
|
},
|
|
mode: Ignore,
|
|
},
|
|
c_variadic: false,
|
|
fixed_count: 1,
|
|
conv: Rust,
|
|
can_unwind: $SOME_BOOL,
|
|
}
|
|
--> $DIR/debug.rs:59:1
|
|
|
|
|
LL | type TestAbiNe = (fn(u8), fn(u32));
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
error: ABIs are not compatible
|
|
left ABI = FnAbi {
|
|
args: [
|
|
ArgAbi {
|
|
layout: TyAndLayout {
|
|
ty: [u8; 32],
|
|
layout: Layout {
|
|
size: Size(32 bytes),
|
|
align: AbiAlign {
|
|
abi: $SOME_ALIGN,
|
|
},
|
|
backend_repr: Memory {
|
|
sized: true,
|
|
},
|
|
fields: Array {
|
|
stride: Size(1 bytes),
|
|
count: 32,
|
|
},
|
|
largest_niche: None,
|
|
uninhabited: false,
|
|
variants: Single {
|
|
index: 0,
|
|
},
|
|
max_repr_align: None,
|
|
unadjusted_abi_align: $SOME_ALIGN,
|
|
randomization_seed: $SEED,
|
|
},
|
|
},
|
|
mode: Indirect {
|
|
attrs: ArgAttributes {
|
|
regular: CapturesAddress | NoAlias | NonNull | NoUndef,
|
|
arg_ext: None,
|
|
pointee_size: Size(32 bytes),
|
|
pointee_align: Some(
|
|
Align(1 bytes),
|
|
),
|
|
},
|
|
meta_attrs: None,
|
|
on_stack: false,
|
|
},
|
|
},
|
|
],
|
|
ret: ArgAbi {
|
|
layout: TyAndLayout {
|
|
ty: (),
|
|
layout: Layout {
|
|
size: Size(0 bytes),
|
|
align: AbiAlign {
|
|
abi: $SOME_ALIGN,
|
|
},
|
|
backend_repr: Memory {
|
|
sized: true,
|
|
},
|
|
fields: Arbitrary {
|
|
offsets: [],
|
|
in_memory_order: [],
|
|
},
|
|
largest_niche: None,
|
|
uninhabited: false,
|
|
variants: Single {
|
|
index: 0,
|
|
},
|
|
max_repr_align: None,
|
|
unadjusted_abi_align: $SOME_ALIGN,
|
|
randomization_seed: $SEED,
|
|
},
|
|
},
|
|
mode: Ignore,
|
|
},
|
|
c_variadic: false,
|
|
fixed_count: 1,
|
|
conv: Rust,
|
|
can_unwind: $SOME_BOOL,
|
|
}
|
|
right ABI = FnAbi {
|
|
args: [
|
|
ArgAbi {
|
|
layout: TyAndLayout {
|
|
ty: [u32; 32],
|
|
layout: Layout {
|
|
size: Size(128 bytes),
|
|
align: AbiAlign {
|
|
abi: $SOME_ALIGN,
|
|
},
|
|
backend_repr: Memory {
|
|
sized: true,
|
|
},
|
|
fields: Array {
|
|
stride: Size(4 bytes),
|
|
count: 32,
|
|
},
|
|
largest_niche: None,
|
|
uninhabited: false,
|
|
variants: Single {
|
|
index: 0,
|
|
},
|
|
max_repr_align: None,
|
|
unadjusted_abi_align: $SOME_ALIGN,
|
|
randomization_seed: $SEED,
|
|
},
|
|
},
|
|
mode: Indirect {
|
|
attrs: ArgAttributes {
|
|
regular: CapturesAddress | NoAlias | NonNull | NoUndef,
|
|
arg_ext: None,
|
|
pointee_size: Size(128 bytes),
|
|
pointee_align: Some(
|
|
Align(4 bytes),
|
|
),
|
|
},
|
|
meta_attrs: None,
|
|
on_stack: false,
|
|
},
|
|
},
|
|
],
|
|
ret: ArgAbi {
|
|
layout: TyAndLayout {
|
|
ty: (),
|
|
layout: Layout {
|
|
size: Size(0 bytes),
|
|
align: AbiAlign {
|
|
abi: $SOME_ALIGN,
|
|
},
|
|
backend_repr: Memory {
|
|
sized: true,
|
|
},
|
|
fields: Arbitrary {
|
|
offsets: [],
|
|
in_memory_order: [],
|
|
},
|
|
largest_niche: None,
|
|
uninhabited: false,
|
|
variants: Single {
|
|
index: 0,
|
|
},
|
|
max_repr_align: None,
|
|
unadjusted_abi_align: $SOME_ALIGN,
|
|
randomization_seed: $SEED,
|
|
},
|
|
},
|
|
mode: Ignore,
|
|
},
|
|
c_variadic: false,
|
|
fixed_count: 1,
|
|
conv: Rust,
|
|
can_unwind: $SOME_BOOL,
|
|
}
|
|
--> $DIR/debug.rs:62:1
|
|
|
|
|
LL | type TestAbiNeLarger = (fn([u8; 32]), fn([u32; 32]));
|
|
| ^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: ABIs are not compatible
|
|
left ABI = FnAbi {
|
|
args: [
|
|
ArgAbi {
|
|
layout: TyAndLayout {
|
|
ty: f32,
|
|
layout: Layout {
|
|
size: $SOME_SIZE,
|
|
align: AbiAlign {
|
|
abi: $SOME_ALIGN,
|
|
},
|
|
backend_repr: Scalar(
|
|
Initialized {
|
|
value: Float(
|
|
F32,
|
|
),
|
|
valid_range: $FULL,
|
|
},
|
|
),
|
|
fields: Primitive,
|
|
largest_niche: None,
|
|
uninhabited: false,
|
|
variants: Single {
|
|
index: 0,
|
|
},
|
|
max_repr_align: None,
|
|
unadjusted_abi_align: $SOME_ALIGN,
|
|
randomization_seed: $SEED,
|
|
},
|
|
},
|
|
mode: Direct(
|
|
ArgAttributes {
|
|
regular: NoUndef,
|
|
arg_ext: None,
|
|
pointee_size: Size(0 bytes),
|
|
pointee_align: None,
|
|
},
|
|
),
|
|
},
|
|
],
|
|
ret: ArgAbi {
|
|
layout: TyAndLayout {
|
|
ty: (),
|
|
layout: Layout {
|
|
size: Size(0 bytes),
|
|
align: AbiAlign {
|
|
abi: $SOME_ALIGN,
|
|
},
|
|
backend_repr: Memory {
|
|
sized: true,
|
|
},
|
|
fields: Arbitrary {
|
|
offsets: [],
|
|
in_memory_order: [],
|
|
},
|
|
largest_niche: None,
|
|
uninhabited: false,
|
|
variants: Single {
|
|
index: 0,
|
|
},
|
|
max_repr_align: None,
|
|
unadjusted_abi_align: $SOME_ALIGN,
|
|
randomization_seed: $SEED,
|
|
},
|
|
},
|
|
mode: Ignore,
|
|
},
|
|
c_variadic: false,
|
|
fixed_count: 1,
|
|
conv: Rust,
|
|
can_unwind: $SOME_BOOL,
|
|
}
|
|
right ABI = FnAbi {
|
|
args: [
|
|
ArgAbi {
|
|
layout: TyAndLayout {
|
|
ty: u32,
|
|
layout: Layout {
|
|
size: $SOME_SIZE,
|
|
align: AbiAlign {
|
|
abi: $SOME_ALIGN,
|
|
},
|
|
backend_repr: Scalar(
|
|
Initialized {
|
|
value: Int(
|
|
I32,
|
|
false,
|
|
),
|
|
valid_range: $FULL,
|
|
},
|
|
),
|
|
fields: Primitive,
|
|
largest_niche: None,
|
|
uninhabited: false,
|
|
variants: Single {
|
|
index: 0,
|
|
},
|
|
max_repr_align: None,
|
|
unadjusted_abi_align: $SOME_ALIGN,
|
|
randomization_seed: $SEED,
|
|
},
|
|
},
|
|
mode: Direct(
|
|
ArgAttributes {
|
|
regular: NoUndef,
|
|
arg_ext: None,
|
|
pointee_size: Size(0 bytes),
|
|
pointee_align: None,
|
|
},
|
|
),
|
|
},
|
|
],
|
|
ret: ArgAbi {
|
|
layout: TyAndLayout {
|
|
ty: (),
|
|
layout: Layout {
|
|
size: Size(0 bytes),
|
|
align: AbiAlign {
|
|
abi: $SOME_ALIGN,
|
|
},
|
|
backend_repr: Memory {
|
|
sized: true,
|
|
},
|
|
fields: Arbitrary {
|
|
offsets: [],
|
|
in_memory_order: [],
|
|
},
|
|
largest_niche: None,
|
|
uninhabited: false,
|
|
variants: Single {
|
|
index: 0,
|
|
},
|
|
max_repr_align: None,
|
|
unadjusted_abi_align: $SOME_ALIGN,
|
|
randomization_seed: $SEED,
|
|
},
|
|
},
|
|
mode: Ignore,
|
|
},
|
|
c_variadic: false,
|
|
fixed_count: 1,
|
|
conv: Rust,
|
|
can_unwind: $SOME_BOOL,
|
|
}
|
|
--> $DIR/debug.rs:65:1
|
|
|
|
|
LL | type TestAbiNeFloat = (fn(f32), fn(u32));
|
|
| ^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: ABIs are not compatible
|
|
left ABI = FnAbi {
|
|
args: [
|
|
ArgAbi {
|
|
layout: TyAndLayout {
|
|
ty: i32,
|
|
layout: Layout {
|
|
size: $SOME_SIZE,
|
|
align: AbiAlign {
|
|
abi: $SOME_ALIGN,
|
|
},
|
|
backend_repr: Scalar(
|
|
Initialized {
|
|
value: Int(
|
|
I32,
|
|
true,
|
|
),
|
|
valid_range: $FULL,
|
|
},
|
|
),
|
|
fields: Primitive,
|
|
largest_niche: None,
|
|
uninhabited: false,
|
|
variants: Single {
|
|
index: 0,
|
|
},
|
|
max_repr_align: None,
|
|
unadjusted_abi_align: $SOME_ALIGN,
|
|
randomization_seed: $SEED,
|
|
},
|
|
},
|
|
mode: Direct(
|
|
ArgAttributes {
|
|
regular: NoUndef,
|
|
arg_ext: None,
|
|
pointee_size: Size(0 bytes),
|
|
pointee_align: None,
|
|
},
|
|
),
|
|
},
|
|
],
|
|
ret: ArgAbi {
|
|
layout: TyAndLayout {
|
|
ty: (),
|
|
layout: Layout {
|
|
size: Size(0 bytes),
|
|
align: AbiAlign {
|
|
abi: $SOME_ALIGN,
|
|
},
|
|
backend_repr: Memory {
|
|
sized: true,
|
|
},
|
|
fields: Arbitrary {
|
|
offsets: [],
|
|
in_memory_order: [],
|
|
},
|
|
largest_niche: None,
|
|
uninhabited: false,
|
|
variants: Single {
|
|
index: 0,
|
|
},
|
|
max_repr_align: None,
|
|
unadjusted_abi_align: $SOME_ALIGN,
|
|
randomization_seed: $SEED,
|
|
},
|
|
},
|
|
mode: Ignore,
|
|
},
|
|
c_variadic: false,
|
|
fixed_count: 1,
|
|
conv: Rust,
|
|
can_unwind: $SOME_BOOL,
|
|
}
|
|
right ABI = FnAbi {
|
|
args: [
|
|
ArgAbi {
|
|
layout: TyAndLayout {
|
|
ty: u32,
|
|
layout: Layout {
|
|
size: $SOME_SIZE,
|
|
align: AbiAlign {
|
|
abi: $SOME_ALIGN,
|
|
},
|
|
backend_repr: Scalar(
|
|
Initialized {
|
|
value: Int(
|
|
I32,
|
|
false,
|
|
),
|
|
valid_range: $FULL,
|
|
},
|
|
),
|
|
fields: Primitive,
|
|
largest_niche: None,
|
|
uninhabited: false,
|
|
variants: Single {
|
|
index: 0,
|
|
},
|
|
max_repr_align: None,
|
|
unadjusted_abi_align: $SOME_ALIGN,
|
|
randomization_seed: $SEED,
|
|
},
|
|
},
|
|
mode: Direct(
|
|
ArgAttributes {
|
|
regular: NoUndef,
|
|
arg_ext: None,
|
|
pointee_size: Size(0 bytes),
|
|
pointee_align: None,
|
|
},
|
|
),
|
|
},
|
|
],
|
|
ret: ArgAbi {
|
|
layout: TyAndLayout {
|
|
ty: (),
|
|
layout: Layout {
|
|
size: Size(0 bytes),
|
|
align: AbiAlign {
|
|
abi: $SOME_ALIGN,
|
|
},
|
|
backend_repr: Memory {
|
|
sized: true,
|
|
},
|
|
fields: Arbitrary {
|
|
offsets: [],
|
|
in_memory_order: [],
|
|
},
|
|
largest_niche: None,
|
|
uninhabited: false,
|
|
variants: Single {
|
|
index: 0,
|
|
},
|
|
max_repr_align: None,
|
|
unadjusted_abi_align: $SOME_ALIGN,
|
|
randomization_seed: $SEED,
|
|
},
|
|
},
|
|
mode: Ignore,
|
|
},
|
|
c_variadic: false,
|
|
fixed_count: 1,
|
|
conv: Rust,
|
|
can_unwind: $SOME_BOOL,
|
|
}
|
|
--> $DIR/debug.rs:69:1
|
|
|
|
|
LL | type TestAbiNeSign = (fn(i32), fn(u32));
|
|
| ^^^^^^^^^^^^^^^^^^
|
|
|
|
error[E0277]: the size for values of type `str` cannot be known at compilation time
|
|
--> $DIR/debug.rs:72:46
|
|
|
|
|
LL | type TestAbiEqNonsense = (fn((str, str)), fn((str, str)));
|
|
| ^^^^^^^^^^ doesn't have a size known at compile-time
|
|
|
|
|
= help: the trait `Sized` is not implemented for `str`
|
|
= note: only the last element of a tuple may have a dynamically sized type
|
|
|
|
error: `#[rustc_abi]` can only be applied to function items, type aliases, and associated functions
|
|
--> $DIR/debug.rs:47:5
|
|
|
|
|
LL | const C: () = ();
|
|
| ^^^^^^^^^^^
|
|
|
|
error: fn_abi_of(assoc_test) = FnAbi {
|
|
args: [
|
|
ArgAbi {
|
|
layout: TyAndLayout {
|
|
ty: &S,
|
|
layout: Layout {
|
|
size: $SOME_SIZE,
|
|
align: AbiAlign {
|
|
abi: $SOME_ALIGN,
|
|
},
|
|
backend_repr: Scalar(
|
|
Initialized {
|
|
value: Pointer(
|
|
AddressSpace(
|
|
0,
|
|
),
|
|
),
|
|
valid_range: $NON_NULL,
|
|
},
|
|
),
|
|
fields: Primitive,
|
|
largest_niche: Some(
|
|
Niche {
|
|
offset: Size(0 bytes),
|
|
value: Pointer(
|
|
AddressSpace(
|
|
0,
|
|
),
|
|
),
|
|
valid_range: $NON_NULL,
|
|
},
|
|
),
|
|
uninhabited: false,
|
|
variants: Single {
|
|
index: 0,
|
|
},
|
|
max_repr_align: None,
|
|
unadjusted_abi_align: $SOME_ALIGN,
|
|
randomization_seed: $SEED,
|
|
},
|
|
},
|
|
mode: Direct(
|
|
ArgAttributes {
|
|
regular: CapturesReadOnly | NoAlias | NonNull | ReadOnly | NoUndef,
|
|
arg_ext: None,
|
|
pointee_size: Size(2 bytes),
|
|
pointee_align: Some(
|
|
Align(2 bytes),
|
|
),
|
|
},
|
|
),
|
|
},
|
|
],
|
|
ret: ArgAbi {
|
|
layout: TyAndLayout {
|
|
ty: (),
|
|
layout: Layout {
|
|
size: Size(0 bytes),
|
|
align: AbiAlign {
|
|
abi: $SOME_ALIGN,
|
|
},
|
|
backend_repr: Memory {
|
|
sized: true,
|
|
},
|
|
fields: Arbitrary {
|
|
offsets: [],
|
|
in_memory_order: [],
|
|
},
|
|
largest_niche: None,
|
|
uninhabited: false,
|
|
variants: Single {
|
|
index: 0,
|
|
},
|
|
max_repr_align: None,
|
|
unadjusted_abi_align: $SOME_ALIGN,
|
|
randomization_seed: $SEED,
|
|
},
|
|
},
|
|
mode: Ignore,
|
|
},
|
|
c_variadic: false,
|
|
fixed_count: 1,
|
|
conv: Rust,
|
|
can_unwind: $SOME_BOOL,
|
|
}
|
|
--> $DIR/debug.rs:52:5
|
|
|
|
|
LL | fn assoc_test(&self) {}
|
|
| ^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: aborting due to 14 previous errors
|
|
|
|
Some errors have detailed explanations: E0277, E0539.
|
|
For more information about an error, try `rustc --explain E0277`.
|