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
This commit is contained in:
Jack Huey 2021-04-28 22:59:28 -04:00 committed by GitHub
commit 43068063c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -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!(

View File

@ -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;
}

View File

@ -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 {}