Skip to content

Commit fb3a089

Browse files
committed
rustdoc: avoid dangling alias pointers after merge
1 parent cf83387 commit fb3a089

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/librustdoc/html/render/search_index.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -721,7 +721,13 @@ impl SerializedSearchIndex {
721721
}
722722
},
723723
),
724-
self.alias_pointers[id].and_then(|alias| map.get(&alias).copied()),
724+
self.alias_pointers[id].and_then(|alias| {
725+
if self.names[alias].is_empty() {
726+
None
727+
} else {
728+
map.get(&alias).copied()
729+
}
730+
}),
725731
);
726732
}
727733
new.generic_inverted_index = self

0 commit comments

Comments
 (0)