Skip to content

Commit 4306806

Browse files
authored
Rollup merge of #84636 - notriddle:data-aliases, r=jyn514,GuillaumeGomez
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
2 parents e6dce23 + b57049a commit 4306806

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/librustdoc/html/render/mod.rs

+1-1
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

+1-1
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
}

src/test/rustdoc/auto_aliases.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#![feature(auto_traits)]
22

3-
// @has auto_aliases/trait.Bar.html '//h3[@aliases="auto_aliases::Foo"]' 'impl Bar for Foo'
3+
// @has auto_aliases/trait.Bar.html '//h3[@data-aliases="auto_aliases::Foo"]' 'impl Bar for Foo'
44
pub struct Foo;
55

66
pub auto trait Bar {}

0 commit comments

Comments
 (0)