also print type type

This commit is contained in:
Ralf Jung 2020-04-05 17:13:30 +02:00
parent 4a75883a78
commit 8f6c109371
2 changed files with 6 additions and 6 deletions

View File

@ -85,7 +85,7 @@ impl LayoutTest<'tcx> {
sym::debug => {
self.tcx.sess.span_err(
item.span,
&format!("layout debugging: {:#?}", *ty_layout),
&format!("layout debugging for type {:?}: {:#?}", ty, *ty_layout),
);
}

View File

@ -1,4 +1,4 @@
error: layout debugging: Layout {
error: layout debugging for type E: Layout {
fields: Arbitrary {
offsets: [
Size {
@ -110,7 +110,7 @@ error: layout debugging: Layout {
LL | enum E { Foo, Bar(!, i32, i32) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: layout debugging: Layout {
error: layout debugging for type S: Layout {
fields: Arbitrary {
offsets: [
Size {
@ -164,7 +164,7 @@ error: layout debugging: Layout {
LL | struct S { f1: i32, f2: (), f3: i32 }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: layout debugging: Layout {
error: layout debugging for type U: Layout {
fields: Union(
2,
),
@ -190,7 +190,7 @@ error: layout debugging: Layout {
LL | union U { f1: (i32, i32), f3: i32 }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: layout debugging: Layout {
error: layout debugging for type std::result::Result<i32, i32>: Layout {
fields: Arbitrary {
offsets: [
Size {
@ -315,7 +315,7 @@ error: layout debugging: Layout {
LL | type Test = Result<i32, i32>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: layout debugging: Layout {
error: layout debugging for type i32: Layout {
fields: Union(
0,
),