diff options
| author | bors <bors@rust-lang.org> | 2023-06-21 19:48:41 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-06-21 19:48:41 +0000 |
| commit | 065a1f5df9c2f1d93269e4d25a2acabbddb0db8d (patch) | |
| tree | c1f5dd78a07bd7887bfa69f8a0e0967219e22702 /src | |
| parent | 006a26c0b546abc0fbef59a773639582b641e500 (diff) | |
| parent | f5470af6a6cac4aed859a072feff62e838f41b37 (diff) | |
Auto merge of #112900 - GuillaumeGomez:rollup-1blf4io, r=GuillaumeGomez
Rollup of 4 pull requests Successful merges: - #112538 (Removed unnecessary &String -> &str, now that &String implements StableOrd as well) - #112868 (Liberate bound vars properly when suggesting missing async-fn-in-trait) - #112892 (resolve: Minor cleanup to `fn resolve_path_with_ribs`) - #112894 (Fix union fields display) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustdoc/html/render/mod.rs | 5 | ||||
| -rw-r--r-- | src/librustdoc/html/templates/item_info.html | 2 | ||||
| -rw-r--r-- | src/librustdoc/html/templates/item_union.html | 11 | ||||
| -rw-r--r-- | src/librustdoc/html/templates/print_item.html | 4 |
4 files changed, 11 insertions, 11 deletions
diff --git a/src/librustdoc/html/render/mod.rs b/src/librustdoc/html/render/mod.rs index 5bd9389a400..c5d6771c2fd 100644 --- a/src/librustdoc/html/render/mod.rs +++ b/src/librustdoc/html/render/mod.rs @@ -421,11 +421,10 @@ fn document<'a, 'cx: 'a>( display_fn(move |f| { document_item_info(cx, item, parent).render_into(f).unwrap(); if parent.is_none() { - write!(f, "{}", document_full_collapsible(item, cx, heading_offset))?; + write!(f, "{}", document_full_collapsible(item, cx, heading_offset)) } else { - write!(f, "{}", document_full(item, cx, heading_offset))?; + write!(f, "{}", document_full(item, cx, heading_offset)) } - Ok(()) }) } diff --git a/src/librustdoc/html/templates/item_info.html b/src/librustdoc/html/templates/item_info.html index d2ea9bdae9c..9e65ae95e15 100644 --- a/src/librustdoc/html/templates/item_info.html +++ b/src/librustdoc/html/templates/item_info.html @@ -1,5 +1,5 @@ {% if !items.is_empty() %} - <span class="item-info"> {# #} + <span class="item-info"> {% for item in items %} {{item|safe}} {# #} {% endfor %} diff --git a/src/librustdoc/html/templates/item_union.html b/src/librustdoc/html/templates/item_union.html index a01457971c1..f6d2fa34890 100644 --- a/src/librustdoc/html/templates/item_union.html +++ b/src/librustdoc/html/templates/item_union.html @@ -4,14 +4,15 @@ </code></pre> {{ self.document() | safe }} {% if self.fields_iter().peek().is_some() %} - <h2 id="fields" class="fields small-section-header"> - Fields<a href="#fields" class="anchor">§</a> + <h2 id="fields" class="fields small-section-header"> {# #} + Fields<a href="#fields" class="anchor">§</a> {# #} </h2> {% for (field, ty) in self.fields_iter() %} {% let name = field.name.expect("union field name") %} - <span id="structfield.{{ name }}" class="{{ ItemType::StructField }} small-section-header"> - <a href="#structfield.{{ name }}" class="anchor field">§</a> - <code>{{ name }}: {{ self.print_ty(ty) | safe }}</code> + <span id="structfield.{{ name }}" {#+ #} + class="{{ ItemType::StructField +}} small-section-header"> {# #} + <a href="#structfield.{{ name }}" class="anchor field">§</a> {# #} + <code>{{ name }}: {{+ self.print_ty(ty) | safe }}</code> {# #} </span> {% if let Some(stability_class) = self.stability_field(field) %} <span class="stab {{ stability_class }}"></span> diff --git a/src/librustdoc/html/templates/print_item.html b/src/librustdoc/html/templates/print_item.html index edabac9a082..68a295ae095 100644 --- a/src/librustdoc/html/templates/print_item.html +++ b/src/librustdoc/html/templates/print_item.html @@ -1,5 +1,5 @@ <div class="main-heading"> {# #} - <h1> {# #} + <h1> {{typ}} {# The breadcrumbs of the item path, like std::string #} {% for component in path_components %} @@ -12,7 +12,7 @@ alt="Copy item path"> {# #} </button> {# #} </h1> {# #} - <span class="out-of-band"> {# #} + <span class="out-of-band"> {% if !stability_since_raw.is_empty() %} {{ stability_since_raw|safe +}} · {#+ #} {% endif %} |
