Skip to content

Commit 8f6c109

Browse files
committed
also print type type
1 parent 4a75883 commit 8f6c109

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/librustc_passes/layout_test.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ impl LayoutTest<'tcx> {
8585
sym::debug => {
8686
self.tcx.sess.span_err(
8787
item.span,
88-
&format!("layout debugging: {:#?}", *ty_layout),
88+
&format!("layout debugging for type {:?}: {:#?}", ty, *ty_layout),
8989
);
9090
}
9191

src/test/ui/layout/debug.stderr

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: layout debugging: Layout {
1+
error: layout debugging for type E: Layout {
22
fields: Arbitrary {
33
offsets: [
44
Size {
@@ -110,7 +110,7 @@ error: layout debugging: Layout {
110110
LL | enum E { Foo, Bar(!, i32, i32) }
111111
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
112112

113-
error: layout debugging: Layout {
113+
error: layout debugging for type S: Layout {
114114
fields: Arbitrary {
115115
offsets: [
116116
Size {
@@ -164,7 +164,7 @@ error: layout debugging: Layout {
164164
LL | struct S { f1: i32, f2: (), f3: i32 }
165165
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
166166

167-
error: layout debugging: Layout {
167+
error: layout debugging for type U: Layout {
168168
fields: Union(
169169
2,
170170
),
@@ -190,7 +190,7 @@ error: layout debugging: Layout {
190190
LL | union U { f1: (i32, i32), f3: i32 }
191191
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
192192

193-
error: layout debugging: Layout {
193+
error: layout debugging for type std::result::Result<i32, i32>: Layout {
194194
fields: Arbitrary {
195195
offsets: [
196196
Size {
@@ -315,7 +315,7 @@ error: layout debugging: Layout {
315315
LL | type Test = Result<i32, i32>;
316316
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
317317

318-
error: layout debugging: Layout {
318+
error: layout debugging for type i32: Layout {
319319
fields: Union(
320320
0,
321321
),

0 commit comments

Comments
 (0)