normalize away preferred alignment

This commit is contained in:
Ralf Jung 2020-03-21 10:07:44 +01:00
parent 7b49678f5f
commit e548df7e36
2 changed files with 13 additions and 28 deletions

View File

@ -1,3 +1,4 @@
// normalize-stderr-test "pref: Align \{\n *pow2: [1-3],\n *\}" -> "pref: $$PREF_ALIGN"
#![feature(never_type, rustc_attrs)] #![feature(never_type, rustc_attrs)]
#![crate_type = "lib"] #![crate_type = "lib"]

View File

@ -36,9 +36,7 @@ error: layout debugging: LayoutDetails {
abi: Align { abi: Align {
pow2: 0, pow2: 0,
}, },
pref: Align { pref: $PREF_ALIGN,
pow2: 3,
},
}, },
size: Size { size: Size {
raw: 4, raw: 4,
@ -72,9 +70,7 @@ error: layout debugging: LayoutDetails {
abi: Align { abi: Align {
pow2: 2, pow2: 2,
}, },
pref: Align { pref: $PREF_ALIGN,
pow2: 3,
},
}, },
size: Size { size: Size {
raw: 12, raw: 12,
@ -103,15 +99,13 @@ error: layout debugging: LayoutDetails {
abi: Align { abi: Align {
pow2: 2, pow2: 2,
}, },
pref: Align { pref: $PREF_ALIGN,
pow2: 3,
},
}, },
size: Size { size: Size {
raw: 12, raw: 12,
}, },
} }
--> $DIR/debug.rs:5:1 --> $DIR/debug.rs:6:1
| |
LL | enum E { Foo, Bar(!, i32, i32) } LL | enum E { Foo, Bar(!, i32, i32) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -159,15 +153,13 @@ error: layout debugging: LayoutDetails {
abi: Align { abi: Align {
pow2: 2, pow2: 2,
}, },
pref: Align { pref: $PREF_ALIGN,
pow2: 3,
},
}, },
size: Size { size: Size {
raw: 8, raw: 8,
}, },
} }
--> $DIR/debug.rs:8:1 --> $DIR/debug.rs:9:1
| |
LL | struct S { f1: i32, f2: (), f3: i32 } LL | struct S { f1: i32, f2: (), f3: i32 }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -187,15 +179,13 @@ error: layout debugging: LayoutDetails {
abi: Align { abi: Align {
pow2: 2, pow2: 2,
}, },
pref: Align { pref: $PREF_ALIGN,
pow2: 3,
},
}, },
size: Size { size: Size {
raw: 8, raw: 8,
}, },
} }
--> $DIR/debug.rs:11:1 --> $DIR/debug.rs:12:1
| |
LL | union U { f1: (i32, i32), f3: i32 } LL | union U { f1: (i32, i32), f3: i32 }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -244,9 +234,7 @@ error: layout debugging: LayoutDetails {
abi: Align { abi: Align {
pow2: 2, pow2: 2,
}, },
pref: Align { pref: $PREF_ALIGN,
pow2: 3,
},
}, },
size: Size { size: Size {
raw: 8, raw: 8,
@ -274,9 +262,7 @@ error: layout debugging: LayoutDetails {
abi: Align { abi: Align {
pow2: 2, pow2: 2,
}, },
pref: Align { pref: $PREF_ALIGN,
pow2: 3,
},
}, },
size: Size { size: Size {
raw: 8, raw: 8,
@ -318,15 +304,13 @@ error: layout debugging: LayoutDetails {
abi: Align { abi: Align {
pow2: 2, pow2: 2,
}, },
pref: Align { pref: $PREF_ALIGN,
pow2: 3,
},
}, },
size: Size { size: Size {
raw: 8, raw: 8,
}, },
} }
--> $DIR/debug.rs:14:1 --> $DIR/debug.rs:15:1
| |
LL | type Test = Result<i32, i32>; LL | type Test = Result<i32, i32>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^