Skip to content

Commit

Permalink
feed query and remove outdated comment
Browse files Browse the repository at this point in the history
  • Loading branch information
fee1-dead committed Feb 10, 2024
1 parent 02e547e commit e6fa893
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
5 changes: 0 additions & 5 deletions compiler/rustc_hir_analysis/src/collect/item_bounds.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,6 @@ pub(super) fn explicit_item_bounds(
None => {}
}

// effects desugared associated types have no bounds.
if tcx.is_effects_desugared_assoc_ty(def_id.to_def_id()) {
return ty::EarlyBinder::bind(&[]);
}

let bounds = match tcx.hir_node_by_def_id(def_id) {
hir::Node::TraitItem(hir::TraitItem {
kind: hir::TraitItemKind::Type(bounds, _),
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_middle/src/ty/assoc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ pub struct AssocItem {
/// provides additional information about its source.
pub opt_rpitit_info: Option<ty::ImplTraitInTraitData>,

// TODO: is this necessary
pub is_effects_desugaring: bool,
}

Expand Down
5 changes: 5 additions & 0 deletions compiler/rustc_ty_utils/src/assoc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,9 @@ fn associated_type_for_effects(tcx: TyCtxt<'_>, def_id: LocalDefId) -> Option<De
}
});

// TODO deduplicate
trait_assoc_ty.explicit_item_bounds(ty::EarlyBinder::bind(&[]));

// There are no inferred outlives for the synthesized associated type.
trait_assoc_ty.inferred_outlives_of(&[]);

Expand Down Expand Up @@ -311,6 +314,8 @@ fn associated_type_for_effects(tcx: TyCtxt<'_>, def_id: LocalDefId) -> Option<De
}
});

impl_assoc_ty.explicit_item_bounds(ty::Earlybinder::bind(&[]));

// There are no inferred outlives for the synthesized associated type.
impl_assoc_ty.inferred_outlives_of(&[]);

Expand Down

0 comments on commit e6fa893

Please sign in to comment.