about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorCamelid <camelidcamel@gmail.com>2021-04-07 20:55:37 -0700
committerCamelid <camelidcamel@gmail.com>2021-05-11 09:55:31 -0700
commit5859c5d333465fe91be46196e2b47bff9fc48ece (patch)
tree69a3775bdf07d05416291c0aa89128fde1f8e760 /src
parent001f0dd5a1a544ac9373f0d18e13014ec18dff94 (diff)
downloadrust-5859c5d333465fe91be46196e2b47bff9fc48ece.tar.gz
rust-5859c5d333465fe91be46196e2b47bff9fc48ece.zip
Remove FIXME
Layout errors can occur with valid code, e.g. generic types.
Diffstat (limited to 'src')
-rw-r--r--src/librustdoc/html/render/print_item.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/librustdoc/html/render/print_item.rs b/src/librustdoc/html/render/print_item.rs
index 9b7006150b7..1f7b317a45b 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, "</div>");
         }
-        // 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<T>`. In case of a layout error, we just
+        // don't show any layout information.
+        Err(_) => {}
     }
 }