diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2025-06-14 12:41:30 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2025-08-28 18:24:58 +0200 |
| commit | 10bd61dcf2e5a7dbe95b4b0588a432a444f907a9 (patch) | |
| tree | d0d989264697b361b671f0a03a9a95a11fd9b49a /src/librustdoc/html/render | |
| parent | 38e8963b148fef9fb9c4263cc49d448985bb9982 (diff) | |
Create new `Item::is_fake_item` method as equivalent to check for `is_primitive`, `is_keyword` and `is_attribute` methods
Diffstat (limited to 'src/librustdoc/html/render')
| -rw-r--r-- | src/librustdoc/html/render/context.rs | 2 | ||||
| -rw-r--r-- | src/librustdoc/html/render/print_item.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/librustdoc/html/render/context.rs b/src/librustdoc/html/render/context.rs index cafbcf7e8dd..5f92ab2fada 100644 --- a/src/librustdoc/html/render/context.rs +++ b/src/librustdoc/html/render/context.rs @@ -218,7 +218,7 @@ impl<'tcx> Context<'tcx> { } else { it.name.as_ref().unwrap().as_str() }; - if !it.is_primitive() && !it.is_keyword() && !it.is_attribute() { + if !it.is_fake_item() { if !is_module { title.push_str(" in "); } diff --git a/src/librustdoc/html/render/print_item.rs b/src/librustdoc/html/render/print_item.rs index 530e6da4ee3..afa438f2596 100644 --- a/src/librustdoc/html/render/print_item.rs +++ b/src/librustdoc/html/render/print_item.rs @@ -194,7 +194,7 @@ pub(super) fn print_item(cx: &Context<'_>, item: &clean::Item) -> impl fmt::Disp let src_href = if cx.info.include_sources && !item.is_primitive() { cx.src_href(item) } else { None }; - let path_components = if item.is_primitive() || item.is_keyword() || item.is_attribute() { + let path_components = if item.is_fake_item() { vec![] } else { let cur = &cx.current; |
