Rollup merge of #68598 - GuillaumeGomez:fix-null-synthetic_implementors, r=ollie27

Fix null synthetic_implementors error

Fixes #68584.

r? @ollie27

cc @kinnison
This commit is contained in:
Yuki Okushi 2020-01-29 18:56:28 +09:00 committed by GitHub
commit ed351e2818
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 16 additions and 14 deletions

View File

@ -1895,21 +1895,23 @@ function getSearchElement() {
var implementors = document.getElementById("implementors-list");
var synthetic_implementors = document.getElementById("synthetic-implementors-list");
// This `inlined_types` variable is used to avoid having the same implementation showing
// up twice. For example "String" in the "Sync" doc page.
//
// By the way, this is only used by and useful for traits implemented automatically (like
// "Send" and "Sync").
var inlined_types = new Set();
onEachLazy(synthetic_implementors.getElementsByClassName("impl"), function(el) {
var aliases = el.getAttribute("aliases");
if (!aliases) {
return;
}
aliases.split(",").forEach(function(alias) {
inlined_types.add(alias);
if (synthetic_implementors) {
// This `inlined_types` variable is used to avoid having the same implementation
// showing up twice. For example "String" in the "Sync" doc page.
//
// By the way, this is only used by and useful for traits implemented automatically
// (like "Send" and "Sync").
var inlined_types = new Set();
onEachLazy(synthetic_implementors.getElementsByClassName("impl"), function(el) {
var aliases = el.getAttribute("aliases");
if (!aliases) {
return;
}
aliases.split(",").forEach(function(alias) {
inlined_types.add(alias);
});
});
});
}
var libs = Object.getOwnPropertyNames(imp);
var llength = libs.length;