diff options
| author | Joshua Nelson <jyn514@gmail.com> | 2021-01-03 15:38:46 -0500 |
|---|---|---|
| committer | Joshua Nelson <jyn514@gmail.com> | 2021-01-03 15:40:41 -0500 |
| commit | a786eaac1f0272417fcc023516d09393e109a7ea (patch) | |
| tree | e8e14f2c408e093e6175938b231acb00b9387dae /src/librustdoc/html/render | |
| parent | 18d27b2c94cff9a5f6d8e4d2ea45f6f2e434e5f6 (diff) | |
| download | rust-a786eaac1f0272417fcc023516d09393e109a7ea.tar.gz rust-a786eaac1f0272417fcc023516d09393e109a7ea.zip | |
Simplify rustdoc handling of type aliases for associated types
The logic was very hard to follow before.
Diffstat (limited to 'src/librustdoc/html/render')
| -rw-r--r-- | src/librustdoc/html/render/mod.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/librustdoc/html/render/mod.rs b/src/librustdoc/html/render/mod.rs index c19262b72cf..0430caa75bd 100644 --- a/src/librustdoc/html/render/mod.rs +++ b/src/librustdoc/html/render/mod.rs @@ -4308,6 +4308,7 @@ fn sidebar_assoc_items(it: &clean::Item) -> String { .filter(|i| i.inner_impl().trait_.is_some()) .find(|i| i.inner_impl().trait_.def_id() == c.deref_trait_did) { + debug!("found Deref: {:?}", impl_); if let Some((target, real_target)) = impl_.inner_impl().items.iter().find_map(|item| match *item.kind { clean::TypedefItem(ref t, true) => Some(match *t { @@ -4317,6 +4318,7 @@ fn sidebar_assoc_items(it: &clean::Item) -> String { _ => None, }) { + debug!("found target, real_target: {:?} {:?}", target, real_target); let deref_mut = v .iter() .filter(|i| i.inner_impl().trait_.is_some()) @@ -4328,6 +4330,7 @@ fn sidebar_assoc_items(it: &clean::Item) -> String { .and_then(|prim| c.primitive_locations.get(&prim).cloned())) .and_then(|did| c.impls.get(&did)); if let Some(impls) = inner_impl { + debug!("found inner_impl: {:?}", impls); out.push_str("<a class=\"sidebar-title\" href=\"#deref-methods\">"); out.push_str(&format!( "Methods from {}<Target={}>", |
