about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Howell <michael@notriddle.com>2021-04-27 15:47:49 -0700
committerMichael Howell <michael@notriddle.com>2021-04-28 10:29:08 -0700
commit153eb72d652ca2868ad586056579d71d9231254f (patch)
treea8ca749a3320158bbecb448abba0d1ef43bf0569
parent20040fa332c04b2d17925345163957d196cfbfe6 (diff)
downloadrust-153eb72d652ca2868ad586056579d71d9231254f.tar.gz
rust-153eb72d652ca2868ad586056579d71d9231254f.zip
rustdoc: change aliases attribute to data-aliases
The "aliases" attribute is not listed [on MDN], so it sounds like
it's rustdoc-specific. We don't want to conflict with any attributes
that are added to the spec in the future.

[on MDN]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements
-rw-r--r--src/librustdoc/html/render/mod.rs2
-rw-r--r--src/librustdoc/html/static/main.js2
2 files changed, 2 insertions, 2 deletions
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_impl(
         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;
                 }