Skip to content

Commit

Permalink
normalize away preferred alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Mar 21, 2020
1 parent 7b49678 commit e548df7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 28 deletions.
1 change: 1 addition & 0 deletions src/test/ui/layout/debug.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// normalize-stderr-test "pref: Align \{\n *pow2: [1-3],\n *\}" -> "pref: $$PREF_ALIGN"
#![feature(never_type, rustc_attrs)]
#![crate_type = "lib"]

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

0 comments on commit e548df7

Please sign in to comment.