diff --git a/src/librustdoc/html/render/print_item.rs b/src/librustdoc/html/render/print_item.rs
index 9b7006150b7f..1f7b317a45b8 100644
--- a/src/librustdoc/html/render/print_item.rs
+++ b/src/librustdoc/html/render/print_item.rs
@@ -1551,7 +1551,9 @@ fn document_ty_layout(w: &mut Buffer, cx: &Context<'_>, ty_def_id: DefId) {
}
writeln!(w, "");
}
- // FIXME: should we crash instead? or report an error?
- Err(_layout_err) => {}
+ // Layout errors can occur with valid code, e.g. if you try to get the layout
+ // of a generic type such as `Vec`. In case of a layout error, we just
+ // don't show any layout information.
+ Err(_) => {}
}
}