Change:
<!-- Thank you for filing a bug report! Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --Repro: text /// aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa /// rust /// bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb /// Rustdoc output: ! It seems that only code block with language are affected. cc
A quick test showed that the bug was introduced in (i.e.: works fine)
label +regression-from-stable-to-nightly
Thanks, I'll fix it in the next hours.
In case you want to take a look to the fix, it's .

Discussion:
use crate::clean::RenderedLink; use crate::doctest; <ins> use crate::html::escape::Escape; </ins> use crate::html::highlight; use crate::html::toc::TocBuilder;

let should_panic; let ignore; let edition; <del> if let Some(Event::Start(Tag::CodeBlock(kind))) = event { let parse_result = match kind { CodeBlockKind::Fenced(ref lang) => { LangString::parse_without_check(&lang, self.check_error_codes, false) } CodeBlockKind::Indented => Default::default(), }; if !parse_result.rust { return Some(Event::Start(Tag::CodeBlock(kind))); } compile_fail = parse_result.compile_fail; should_panic = parse_result.should_panic; ignore = parse_result.ignore; edition = parse_result.edition; </del> <ins> let kind = if let Some(Event::Start(Tag::CodeBlock(kind))) = event { kind </ins> } else { return event; <del> } let explicit_edition = edition.is_some(); let edition = edition.unwrap_or(self.edition); </del> <ins> }; </ins> let mut origtext = String::new(); for event in &mut self.inner {

let lines = origtext.lines().filter_map(|l| map_line(l).for_html()); let text = lines.collect::<Vec<Cow<'_, str>>>().join("n"); <ins> let parse_result = match kind { CodeBlockKind::Fenced(ref lang) => { let parse_result = LangString::parse_without_check(&lang, self.check_error_codes, false); if !parse_result.rust { return Some(Event::Html( format!( "<div class="example-wrap"> <pre{}>{}</pre> </div>", format!(" class="language-{}"", lang), Escape(&text), ) .into(), )); } parse_result } CodeBlockKind::Indented => Default::default(), }; compile_fail = parse_result.compile_fail; should_panic = parse_result.should_panic; ignore = parse_result.ignore; edition = parse_result.edition; let explicit_edition = edition.is_some(); let edition = edition.unwrap_or(self.edition); </ins> let playground_button = self.playground.as_ref().and_then(|playground| { let krate = &playground.crate_name; let url = &playground.url;

border-bottom-left-radius: 5px; } <del> .rustdoc:not(.source) .example-wrap > pre.rust { </del> <ins> .rustdoc:not(.source) .example-wrap > pre:not(.line-number) { </ins> width: 100%; overflow-x: auto; }

<ins> // This test ensures that codeblocks content don't overflow. goto: file://|DOC_PATH|/lib2/sub_mod/struct.Foo.html size: (1080, 600) // There should be two codeblocks: a rust one and a non-rust one. assert-count: (".docblock > .example-wrap", 2) assert: ".docblock > .example-wrap > .language-txt" assert: ".docblock > .example-wrap > .rust-example-rendered" assert-css: (".docblock > .example-wrap > pre", {"width": "796px", "overflow-x": "auto"}, ALL) </ins>

<ins> // ignore-tidy-linelength </ins> pub mod module { pub mod sub_module { pub mod sub_sub_module {

const Y: u32 = 0; } impl implementors::Whatever for Foo {} <ins> pub mod sub_mod { /// ```txt /// aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa /// ``` /// /// ``` /// aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa /// ``` pub struct Foo; } </ins>