Skip to content

Commit 153eb72

Browse files
committed
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
1 parent 20040fa commit 153eb72

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/librustdoc/html/render/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1546,7 +1546,7 @@ fn render_impl(
15461546
let aliases = if aliases.is_empty() {
15471547
String::new()
15481548
} else {
1549-
format!(" aliases=\"{}\"", aliases.join(","))
1549+
format!(" data-aliases=\"{}\"", aliases.join(","))
15501550
};
15511551
if let Some(use_absolute) = use_absolute {
15521552
write!(

src/librustdoc/html/static/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -834,7 +834,7 @@ function hideThemeButtonState() {
834834
// (like "Send" and "Sync").
835835
var inlined_types = new Set();
836836
onEachLazy(synthetic_implementors.getElementsByClassName("impl"), function(el) {
837-
var aliases = el.getAttribute("aliases");
837+
var aliases = el.getAttribute("data-aliases");
838838
if (!aliases) {
839839
return;
840840
}

0 commit comments

Comments
 (0)