diff options
| author | Michael Howell <michael@notriddle.com> | 2022-09-27 12:27:04 -0700 |
|---|---|---|
| committer | Michael Howell <michael@notriddle.com> | 2022-09-27 12:27:04 -0700 |
| commit | a63a03dc5442b604cb58ce2aafd2a051072e623f (patch) | |
| tree | 40dd9bcd5ac3c195141eee0c30006916310e5cdd /src/librustdoc/html/render | |
| parent | 57ee5cf5a93923dae9c98bffb11545fc3a31368d (diff) | |
| download | rust-a63a03dc5442b604cb58ce2aafd2a051072e623f.tar.gz rust-a63a03dc5442b604cb58ce2aafd2a051072e623f.zip | |
rustdoc: remove `clean::TraitWithExtraInfo`
Instead, it gathers the extra info later, when it's actually requested.
Diffstat (limited to 'src/librustdoc/html/render')
| -rw-r--r-- | src/librustdoc/html/render/mod.rs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/librustdoc/html/render/mod.rs b/src/librustdoc/html/render/mod.rs index 75ac11a3a88..aa9788fad2b 100644 --- a/src/librustdoc/html/render/mod.rs +++ b/src/librustdoc/html/render/mod.rs @@ -1294,7 +1294,12 @@ fn notable_traits_decl(decl: &clean::FnDecl, cx: &Context<'_>) -> String { if let Some(trait_) = &impl_.trait_ { let trait_did = trait_.def_id(); - if cx.cache().traits.get(&trait_did).map_or(false, |t| t.is_notable) { + if cx + .cache() + .traits + .get(&trait_did) + .map_or(false, |t| t.is_notable_trait(cx.tcx())) + { if out.is_empty() { write!( &mut out, @@ -1598,7 +1603,7 @@ fn render_impl( link, render_mode, false, - trait_.map(|t| &t.trait_), + trait_, rendering_params, ); } @@ -1658,7 +1663,7 @@ fn render_impl( &mut default_impl_items, &mut impl_items, cx, - &t.trait_, + t, i.inner_impl(), &i.impl_item, parent, |
