Skip to content

Commit 4f98f78

Browse files
committed
fix(clippy): restore layout_panics reporting to silence dead_code warning
The reporting code was inadvertently dropped when constructing this commit from the original branch. Without it, LayoutPanic's fields are never read and clippy -Dwarnings fails.
1 parent 6329128 commit 4f98f78

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/printer/collect.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,16 @@ fn collect_and_analyze_items(
142142
all_items.push(item);
143143
}
144144

145+
if !ty_visitor.layout_panics.is_empty() {
146+
eprintln!(
147+
"warning: {} type layout(s) could not be computed (rustc panicked):",
148+
ty_visitor.layout_panics.len()
149+
);
150+
for panic in &ty_visitor.layout_panics {
151+
eprintln!(" type {:?}: {}", panic.ty, panic.message);
152+
}
153+
}
154+
145155
(
146156
CollectedCrate {
147157
items: all_items,

0 commit comments

Comments
 (0)