Skip to content

Commit 931b0f3

Browse files
committed
Rename is_ty_associated_type -> is_required_associated_type
1 parent 5c35c71 commit 931b0f3

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

src/librustdoc/clean/types.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ impl Item {
547547
pub(crate) fn is_associated_type(&self) -> bool {
548548
matches!(self.kind, AssocTypeItem(..) | StrippedItem(box AssocTypeItem(..)))
549549
}
550-
pub(crate) fn is_ty_associated_type(&self) -> bool {
550+
pub(crate) fn is_required_associated_type(&self) -> bool {
551551
matches!(self.kind, RequiredAssocTypeItem(..) | StrippedItem(box RequiredAssocTypeItem(..)))
552552
}
553553
pub(crate) fn is_associated_const(&self) -> bool {

src/librustdoc/html/render/print_item.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,8 @@ fn item_function(w: &mut Buffer, cx: &Context<'_>, it: &clean::Item, f: &clean::
651651
fn item_trait(w: &mut Buffer, cx: &Context<'_>, it: &clean::Item, t: &clean::Trait) {
652652
let tcx = cx.tcx();
653653
let bounds = bounds(&t.bounds, false, cx);
654-
let required_types = t.items.iter().filter(|m| m.is_ty_associated_type()).collect::<Vec<_>>();
654+
let required_types =
655+
t.items.iter().filter(|m| m.is_required_associated_type()).collect::<Vec<_>>();
655656
let provided_types = t.items.iter().filter(|m| m.is_associated_type()).collect::<Vec<_>>();
656657
let required_consts =
657658
t.items.iter().filter(|m| m.is_required_associated_const()).collect::<Vec<_>>();

src/librustdoc/html/render/search_index.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1207,7 +1207,7 @@ fn simplify_fn_type<'a, 'tcx>(
12071207
&& let Type::Path { path } = arg
12081208
&& let def_id = path.def_id()
12091209
&& let Some(trait_) = cache.traits.get(&def_id)
1210-
&& trait_.items.iter().any(|at| at.is_ty_associated_type())
1210+
&& trait_.items.iter().any(|at| at.is_required_associated_type())
12111211
{
12121212
for assoc_ty in &trait_.items {
12131213
if let clean::ItemKind::RequiredAssocTypeItem(_generics, bounds) =

src/librustdoc/html/render/sidebar.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ fn sidebar_trait<'a>(
282282
res
283283
}
284284

285-
let req_assoc = filter_items(&t.items, |m| m.is_ty_associated_type(), "associatedtype");
285+
let req_assoc = filter_items(&t.items, |m| m.is_required_associated_type(), "associatedtype");
286286
let prov_assoc = filter_items(&t.items, |m| m.is_associated_type(), "associatedtype");
287287
let req_assoc_const =
288288
filter_items(&t.items, |m| m.is_required_associated_const(), "associatedconstant");

0 commit comments

Comments
 (0)