Skip to content

Commit ad3cec8

Browse files
supertrait_def_ids
1 parent 81c2c57 commit ad3cec8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/rustc_middle/src/ty/context.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2443,7 +2443,7 @@ impl<'tcx> TyCtxt<'tcx> {
24432443
/// Given the def_id of a Trait `trait_def_id` and the name of an associated item `assoc_name`
24442444
/// returns true if the `trait_def_id` defines an associated item of name `assoc_name`.
24452445
pub fn trait_may_define_assoc_item(self, trait_def_id: DefId, assoc_name: Ident) -> bool {
2446-
self.super_traits_of(trait_def_id).any(|trait_did| {
2446+
self.supertrait_def_ids(trait_def_id).any(|trait_did| {
24472447
self.associated_items(trait_did)
24482448
.filter_by_name_unhygienic(assoc_name.name)
24492449
.any(|item| self.hygienic_eq(assoc_name, item.ident(self), trait_did))
@@ -2468,7 +2468,7 @@ impl<'tcx> TyCtxt<'tcx> {
24682468
/// does not compute the full elaborated super-predicates but just the set of def-ids. It is used
24692469
/// to identify which traits may define a given associated type to help avoid cycle errors.
24702470
/// Returns a `DefId` iterator.
2471-
fn super_traits_of(self, trait_def_id: DefId) -> impl Iterator<Item = DefId> + 'tcx {
2471+
fn supertrait_def_ids(self, trait_def_id: DefId) -> impl Iterator<Item = DefId> + 'tcx {
24722472
let mut set = FxHashSet::default();
24732473
let mut stack = vec![trait_def_id];
24742474

0 commit comments

Comments
 (0)