diff --git a/src/librustdoc/html/static/main.css b/src/librustdoc/html/static/main.css
index 7cc34798f99..b28da098a57 100644
--- a/src/librustdoc/html/static/main.css
+++ b/src/librustdoc/html/static/main.css
@@ -584,3 +584,9 @@ pre.rust { position: relative; }
height: 1.5em;
}
}
+
+@media print {
+ nav.sub, .content .out-of-band, .collapse-toggle {
+ display: none;
+ }
+}