@@ -57,7 +57,6 @@ pub(super) fn predicates_of(tcx: TyCtxt<'_>, def_id: DefId) -> ty::GenericPredic
57
57
#[ instrument( level = "trace" , skip( tcx) , ret) ]
58
58
fn gather_explicit_predicates_of ( tcx : TyCtxt < ' _ > , def_id : LocalDefId ) -> ty:: GenericPredicates < ' _ > {
59
59
use rustc_hir:: * ;
60
- use rustc_middle:: ty:: Ty ; // to override hir::Ty
61
60
62
61
match tcx. opt_rpitit_info ( def_id. to_def_id ( ) ) {
63
62
Some ( ImplTraitInTraitData :: Trait { fn_def_id, .. } ) => {
@@ -114,36 +113,6 @@ fn gather_explicit_predicates_of(tcx: TyCtxt<'_>, def_id: LocalDefId) -> ty::Gen
114
113
None => { }
115
114
}
116
115
117
- if tcx. is_effects_desugared_assoc_ty ( def_id. to_def_id ( ) ) {
118
- let mut predicates = Vec :: new ( ) ;
119
-
120
- // Inherit predicates of parent (impl or trait)
121
- let parent = tcx. local_parent ( def_id) ;
122
-
123
- let identity_args = ty:: GenericArgs :: identity_for_item ( tcx, def_id) ;
124
- let preds = tcx. explicit_predicates_of ( parent) ;
125
-
126
- if let ty:: AssocItemContainer :: TraitContainer = tcx. associated_item ( def_id) . container {
127
- // for traits, emit `type Effects: TyCompat<<(T1::Effects, ..) as Min>::Output>`
128
- // TODO do the same for impls
129
- let tup = Ty :: new ( tcx, ty:: Tuple ( preds. effects_min_tys ) ) ;
130
- // TODO span
131
- let span = tcx. def_span ( def_id) ;
132
- let assoc = tcx. require_lang_item ( LangItem :: EffectsMinOutput , Some ( span) ) ;
133
- let proj = Ty :: new_projection ( tcx, assoc, [ tup] ) ;
134
- // TODO this is bad
135
- let self_proj = Ty :: new_projection ( tcx, def_id. to_def_id ( ) , identity_args) ;
136
- let trait_ = tcx. require_lang_item ( LangItem :: EffectsTyCompat , Some ( span) ) ;
137
- let trait_ref = ty:: TraitRef :: new ( tcx, trait_, [ self_proj, proj] ) ;
138
- predicates. push ( ( ty:: Binder :: dummy ( trait_ref) . upcast ( tcx) , span) ) ;
139
- }
140
- return ty:: GenericPredicates {
141
- parent : Some ( parent. to_def_id ( ) ) ,
142
- predicates : tcx. arena . alloc_from_iter ( predicates) ,
143
- effects_min_tys : ty:: List :: empty ( ) ,
144
- } ;
145
- }
146
-
147
116
let hir_id = tcx. local_def_id_to_hir_id ( def_id) ;
148
117
let node = tcx. hir_node ( hir_id) ;
149
118
0 commit comments