diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css index afa3970f20776..874994457675f 100644 --- a/src/librustdoc/html/static/css/rustdoc.css +++ b/src/librustdoc/html/static/css/rustdoc.css @@ -2267,6 +2267,17 @@ in src-script.js and main.js margin: 0; padding: var(--nav-sub-mobile-padding); } + + .example-wrap.scraped-example { + flex-wrap: wrap; + } + .example-wrap .scraped-example-title { + width: 100%; + } + .example-wrap.scraped-example .rust { + /* Dirty hacky to force it to remain on the same line as the line numbers. */ + width: 10px; + } } /* Should have min-width: (N + 1)px where N is the mobile breakpoint above. */ diff --git a/src/librustdoc/html/templates/scraped_source.html b/src/librustdoc/html/templates/scraped_source.html index 01abdd607e2ef..4b5d3f2d10aa7 100644 --- a/src/librustdoc/html/templates/scraped_source.html +++ b/src/librustdoc/html/templates/scraped_source.html @@ -1,4 +1,7 @@
+
+ {{info.name +}} ({{info.title}}) {# #} +
{# https://developers.google.com/search/docs/crawling-indexing/robots-meta-tag#data-nosnippet-attr Do not show "1 2 3 4 5 ..." in web search results. #}
@@ -12,9 +15,6 @@
             {{code_html|safe}}
          {# #}
     
{# #} -
- {{info.name +}} ({{info.title}}) {# #} -
{% if info.needs_prev_next_buttons || info.needs_expansion %}
{% if info.needs_prev_next_buttons %}