]> git.lizzy.rs Git - rust.git/blobdiff - src/librustdoc/html/render/print_item.rs
Auto merge of #91255 - b-naber:normalization-ice, r=jackh276
[rust.git] / src / librustdoc / html / render / print_item.rs
index e59b94f6b7d3d09bcf351a92b2253a342e226573..62fdec15af42091bf4db8381f2d815bf84b09140 100644 (file)
@@ -727,8 +727,8 @@ fn trait_item(w: &mut Buffer, cx: &Context<'_>, m: &clean::Item, t: &clean::Item
         let mut implementor_dups: FxHashMap<Symbol, (DefId, bool)> = FxHashMap::default();
         for implementor in implementors {
             match implementor.inner_impl().for_ {
-                clean::ResolvedPath { ref path }
-                | clean::BorrowedRef { type_: box clean::ResolvedPath { ref path }, .. }
+                clean::Type::Path { ref path }
+                | clean::BorrowedRef { type_: box clean::Type::Path { ref path }, .. }
                     if !path.is_assoc_ty() =>
                 {
                     let did = path.def_id();
@@ -1453,8 +1453,8 @@ fn render_implementor(
     // If there's already another implementor that has the same abridged name, use the
     // full path, for example in `std::iter::ExactSizeIterator`
     let use_absolute = match implementor.inner_impl().for_ {
-        clean::ResolvedPath { ref path, .. }
-        | clean::BorrowedRef { type_: box clean::ResolvedPath { ref path, .. }, .. }
+        clean::Type::Path { ref path, .. }
+        | clean::BorrowedRef { type_: box clean::Type::Path { ref path, .. }, .. }
             if !path.is_assoc_ty() =>
         {
             implementor_dups[&path.last()].1
@@ -1769,6 +1769,13 @@ fn write_size_of_layout(w: &mut Buffer, layout: &Layout, tag_size: u64) {
                  the type was too big.</p>"
             );
         }
+        Err(LayoutError::NormalizationFailure(_, _)) => {
+            writeln!(
+                w,
+                "<p><strong>Note:</strong> Encountered an error during type layout; \
+                the type failed to be normalized.</p>"
+            )
+        }
     }
 
     writeln!(w, "</div>");