diff --git a/src/librustdoc/html/render/mod.rs b/src/librustdoc/html/render/mod.rs
index 518dbc6eeb3..7de72d81987 100644
--- a/src/librustdoc/html/render/mod.rs
+++ b/src/librustdoc/html/render/mod.rs
@@ -1546,7 +1546,7 @@ fn render_default_items(
let aliases = if aliases.is_empty() {
String::new()
} else {
- format!(" aliases=\"{}\"", aliases.join(","))
+ format!(" data-aliases=\"{}\"", aliases.join(","))
};
if let Some(use_absolute) = use_absolute {
write!(
diff --git a/src/librustdoc/html/static/main.js b/src/librustdoc/html/static/main.js
index 7fbb97beae7..95b18490641 100644
--- a/src/librustdoc/html/static/main.js
+++ b/src/librustdoc/html/static/main.js
@@ -834,7 +834,7 @@ function hideThemeButtonState() {
// (like "Send" and "Sync").
var inlined_types = new Set();
onEachLazy(synthetic_implementors.getElementsByClassName("impl"), function(el) {
- var aliases = el.getAttribute("aliases");
+ var aliases = el.getAttribute("data-aliases");
if (!aliases) {
return;
}
diff --git a/src/test/rustdoc/auto_aliases.rs b/src/test/rustdoc/auto_aliases.rs
index b8f3527510c..56e0770ab5c 100644
--- a/src/test/rustdoc/auto_aliases.rs
+++ b/src/test/rustdoc/auto_aliases.rs
@@ -1,6 +1,6 @@
#![feature(auto_traits)]
-// @has auto_aliases/trait.Bar.html '//h3[@aliases="auto_aliases::Foo"]' 'impl Bar for Foo'
+// @has auto_aliases/trait.Bar.html '//h3[@data-aliases="auto_aliases::Foo"]' 'impl Bar for Foo'
pub struct Foo;
pub auto trait Bar {}