Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit a97d65d

Browse files
committed
rustdoc: Rename misleading function
- `is_associated` -> `is_type_alias` `is_associated` is not a good name for what this is doing. If you look at https://github.com/rust-lang/rust/pull/74489/files#diff-6a301d597807ee441a41e7237800563dR296, is_associated() and as_assoc_kind() do completely different things, but from the name it sounds like they're similar.
1 parent 9ed91f3 commit a97d65d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/librustdoc/clean/types.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ pub enum ItemEnum {
282282
}
283283

284284
impl ItemEnum {
285-
pub fn is_associated(&self) -> bool {
285+
pub fn is_type_alias(&self) -> bool {
286286
match *self {
287287
ItemEnum::TypedefItem(_, _) | ItemEnum::AssocTypeItem(_, _) => true,
288288
_ => false,

src/librustdoc/html/render/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3612,7 +3612,7 @@ fn render_impl(
36123612
};
36133613

36143614
let (is_hidden, extra_class) =
3615-
if (trait_.is_none() || item.doc_value().is_some() || item.inner.is_associated())
3615+
if (trait_.is_none() || item.doc_value().is_some() || item.inner.is_type_alias())
36163616
&& !is_default_item
36173617
{
36183618
(false, "")

0 commit comments

Comments
 (0)