diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css
index 447300928d3..169aca011b5 100644
--- a/src/librustdoc/html/static/rustdoc.css
+++ b/src/librustdoc/html/static/rustdoc.css
@@ -135,7 +135,6 @@ summary {
code, pre {
font-family: "Source Code Pro", monospace;
- white-space: pre-wrap;
}
.docblock code, .docblock-short code {
border-radius: 3px;
@@ -303,6 +302,7 @@ nav.sub {
:not(.source) .example-wrap > pre.rust {
width: 100%;
+ overflow-x: auto;
}
body:not(.source) .example-wrap > pre {