about summary refs log tree commit diff
path: root/src/librustdoc/html
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume.gomez@huawei.com>2022-07-22 14:26:05 +0200
committerGuillaume Gomez <guillaume.gomez@huawei.com>2022-07-22 14:26:05 +0200
commitedb9add193def7fdbb83beefaf5b040499d332f8 (patch)
tree7afd834e54f3f58ef3d12ecc9ae7d407d8e78b48 /src/librustdoc/html
parentd60d88fe5cd55496b9ccb1511a9af4994b7c43d0 (diff)
downloadrust-edb9add193def7fdbb83beefaf5b040499d332f8.tar.gz
rust-edb9add193def7fdbb83beefaf5b040499d332f8.zip
Make some clean::Trait fields computation on demand
Diffstat (limited to 'src/librustdoc/html')
-rw-r--r--src/librustdoc/html/render/mod.rs2
-rw-r--r--src/librustdoc/html/render/print_item.rs8
2 files changed, 5 insertions, 5 deletions
diff --git a/src/librustdoc/html/render/mod.rs b/src/librustdoc/html/render/mod.rs
index c1fdece9ec6..89d372da322 100644
--- a/src/librustdoc/html/render/mod.rs
+++ b/src/librustdoc/html/render/mod.rs
@@ -2295,7 +2295,7 @@ fn sidebar_trait(cx: &Context<'_>, buf: &mut Buffer, it: &clean::Item, t: &clean
     sidebar_assoc_items(cx, buf, it);
 
     print_sidebar_title(buf, "implementors", "Implementors");
-    if t.is_auto {
+    if t.is_auto(cx.tcx()) {
         print_sidebar_title(buf, "synthetic-implementors", "Auto Implementors");
     }
 
diff --git a/src/librustdoc/html/render/print_item.rs b/src/librustdoc/html/render/print_item.rs
index daacc57a55a..b035a81e402 100644
--- a/src/librustdoc/html/render/print_item.rs
+++ b/src/librustdoc/html/render/print_item.rs
@@ -548,8 +548,8 @@ fn item_trait(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, t: &clean:
                 w,
                 "{}{}{}trait {}{}{}",
                 it.visibility.print_with_space(it.item_id, cx),
-                t.unsafety.print_with_space(),
-                if t.is_auto { "auto " } else { "" },
+                t.unsafety(cx.tcx()).print_with_space(),
+                if t.is_auto(cx.tcx()) { "auto " } else { "" },
                 it.name.unwrap(),
                 t.generics.print(cx),
                 bounds
@@ -883,7 +883,7 @@ fn item_trait(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, t: &clean:
         }
         w.write_str("</div>");
 
-        if t.is_auto {
+        if t.is_auto(cx.tcx()) {
             write_small_section_header(
                 w,
                 "synthetic-implementors",
@@ -912,7 +912,7 @@ fn item_trait(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, t: &clean:
             "<div class=\"item-list\" id=\"implementors-list\"></div>",
         );
 
-        if t.is_auto {
+        if t.is_auto(cx.tcx()) {
             write_small_section_header(
                 w,
                 "synthetic-implementors",