Remove is_spotlight field from Trait

This commit is contained in:
Guillaume Gomez
2021-01-28 17:05:22 +01:00
parent fe1bf8e05c
commit 58a34a4dde
10 changed files with 39 additions and 20 deletions

View File

@@ -3687,8 +3687,9 @@ fn spotlight_decl(decl: &clean::FnDecl, cache: &Cache) -> String {
if let Some(impls) = cache.impls.get(&did) {
for i in impls {
let impl_ = i.inner_impl();
if impl_.trait_.def_id_full(cache).map_or(false, |d| cache.traits[&d].is_spotlight)
{
if impl_.trait_.def_id().map_or(false, |d| {
cache.traits.get(&d).map(|(_, is_spotlight)| *is_spotlight).unwrap_or(false)
}) {
if out.is_empty() {
write!(
&mut out,
@@ -3979,7 +3980,7 @@ fn render_impl(
false,
outer_version,
outer_const_version,
trait_,
trait_.map(|(t, _)| t),
show_def_docs,
);
}
@@ -4024,7 +4025,7 @@ fn render_impl(
// We don't emit documentation for default items if they appear in the
// Implementations on Foreign Types or Implementors sections.
if show_default_items {
if let Some(t) = trait_ {
if let Some((t, _)) = trait_ {
render_default_items(
w,
cx,