diff --git a/src/librustdoc/html/static/css/themes/ayu.css b/src/librustdoc/html/static/css/themes/ayu.css
index a78ac5da749..63f64dc69e8 100644
--- a/src/librustdoc/html/static/css/themes/ayu.css
+++ b/src/librustdoc/html/static/css/themes/ayu.css
@@ -635,7 +635,7 @@ kbd {
background-color: #14191f;
color: #ffb44c;
}
-#source-sidebar div.files > .selected {
+#source-sidebar div.files > a.selected {
background-color: #14191f;
color: #ffb44c;
}
diff --git a/src/librustdoc/html/static/css/themes/dark.css b/src/librustdoc/html/static/css/themes/dark.css
index a2abd53fa02..d1f79b5b082 100644
--- a/src/librustdoc/html/static/css/themes/dark.css
+++ b/src/librustdoc/html/static/css/themes/dark.css
@@ -504,7 +504,7 @@ kbd {
#source-sidebar div.files > a:focus, details.dir-entry summary:focus {
background-color: #444;
}
-#source-sidebar div.files > .selected {
+#source-sidebar div.files > a.selected {
background-color: #333;
}
diff --git a/src/librustdoc/html/static/css/themes/light.css b/src/librustdoc/html/static/css/themes/light.css
index c4510ad6ae6..e09b1f7a5e2 100644
--- a/src/librustdoc/html/static/css/themes/light.css
+++ b/src/librustdoc/html/static/css/themes/light.css
@@ -488,10 +488,9 @@ kbd {
#source-sidebar div.files > a:focus, details.dir-entry summary:focus {
background-color: #E0E0E0;
}
-#source-sidebar div.files > .selected {
+#source-sidebar div.files > a.selected {
background-color: #fff;
}
-
.scraped-example-list .scrape-help {
border-color: #555;
color: #333;
diff --git a/src/librustdoc/html/static/js/source-script.js b/src/librustdoc/html/static/js/source-script.js
index 21c36092790..9173e93e7c8 100644
--- a/src/librustdoc/html/static/js/source-script.js
+++ b/src/librustdoc/html/static/js/source-script.js
@@ -2,7 +2,7 @@
/* global sourcesIndex */
// Local js definitions:
-/* global addClass, getCurrentValue, hasClass, onEachLazy, removeClass, browserSupportsHistoryApi */
+/* global addClass, getCurrentValue, onEachLazy, removeClass, browserSupportsHistoryApi */
/* global updateLocalStorage */
"use strict";