Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit e6fa893

Browse files
committedFeb 10, 2024
feed query and remove outdated comment
1 parent 02e547e commit e6fa893

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed
 

‎compiler/rustc_hir_analysis/src/collect/item_bounds.rs

-5
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,6 @@ pub(super) fn explicit_item_bounds(
104104
None => {}
105105
}
106106

107-
// effects desugared associated types have no bounds.
108-
if tcx.is_effects_desugared_assoc_ty(def_id.to_def_id()) {
109-
return ty::EarlyBinder::bind(&[]);
110-
}
111-
112107
let bounds = match tcx.hir_node_by_def_id(def_id) {
113108
hir::Node::TraitItem(hir::TraitItem {
114109
kind: hir::TraitItemKind::Type(bounds, _),

‎compiler/rustc_middle/src/ty/assoc.rs

-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ pub struct AssocItem {
3434
/// provides additional information about its source.
3535
pub opt_rpitit_info: Option<ty::ImplTraitInTraitData>,
3636

37-
// TODO: is this necessary
3837
pub is_effects_desugaring: bool,
3938
}
4039

‎compiler/rustc_ty_utils/src/assoc.rs

+5
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,9 @@ fn associated_type_for_effects(tcx: TyCtxt<'_>, def_id: LocalDefId) -> Option<De
236236
}
237237
});
238238

239+
// TODO deduplicate
240+
trait_assoc_ty.explicit_item_bounds(ty::EarlyBinder::bind(&[]));
241+
239242
// There are no inferred outlives for the synthesized associated type.
240243
trait_assoc_ty.inferred_outlives_of(&[]);
241244

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

317+
impl_assoc_ty.explicit_item_bounds(ty::Earlybinder::bind(&[]));
318+
314319
// There are no inferred outlives for the synthesized associated type.
315320
impl_assoc_ty.inferred_outlives_of(&[]);
316321

0 commit comments

Comments
 (0)
Failed to load comments.