File tree 4 files changed +5
-5
lines changed
rustc_trait_selection/src/traits
4 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -1601,7 +1601,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
1601
1601
tcx. associated_items ( pred. def_id ( ) )
1602
1602
. in_definition_order ( )
1603
1603
. filter ( |item| item. kind == ty:: AssocKind :: Type )
1604
- . filter ( |item| tcx . opt_rpitit_info ( item. def_id ) . is_none ( ) )
1604
+ . filter ( |item| item. opt_rpitit_info . is_none ( ) )
1605
1605
. map ( |item| item. def_id ) ,
1606
1606
) ;
1607
1607
}
Original file line number Diff line number Diff line change @@ -1216,7 +1216,7 @@ fn compare_number_of_generics<'tcx>(
1216
1216
// has mismatched type or const generic arguments, then the method that it's
1217
1217
// inheriting the generics from will also have mismatched arguments, and
1218
1218
// we'll report an error for that instead. Delay a bug for safety, though.
1219
- if tcx . opt_rpitit_info ( trait_. def_id ) . is_some ( ) {
1219
+ if trait_. opt_rpitit_info . is_some ( ) {
1220
1220
return Err ( tcx. sess . delay_span_bug (
1221
1221
rustc_span:: DUMMY_SP ,
1222
1222
"errors comparing numbers of generics of trait/impl functions were not emitted" ,
@@ -2006,7 +2006,7 @@ pub(super) fn check_type_bounds<'tcx>(
2006
2006
// A synthetic impl Trait for RPITIT desugaring has no HIR, which we currently use to get the
2007
2007
// span for an impl's associated type. Instead, for these, use the def_span for the synthesized
2008
2008
// associated type.
2009
- let impl_ty_span = if tcx . opt_rpitit_info ( impl_ty. def_id ) . is_some ( ) {
2009
+ let impl_ty_span = if impl_ty. opt_rpitit_info . is_some ( ) {
2010
2010
tcx. def_span ( impl_ty_def_id)
2011
2011
} else {
2012
2012
match tcx. hir ( ) . get_by_def_id ( impl_ty_def_id) {
Original file line number Diff line number Diff line change @@ -188,7 +188,7 @@ fn missing_items_err(
188
188
full_impl_span : Span ,
189
189
) {
190
190
let missing_items =
191
- missing_items. iter ( ) . filter ( |trait_item| tcx . opt_rpitit_info ( trait_item. def_id ) . is_none ( ) ) ;
191
+ missing_items. iter ( ) . filter ( |trait_item| trait_item. opt_rpitit_info . is_none ( ) ) ;
192
192
193
193
let missing_items_msg = missing_items
194
194
. clone ( )
Original file line number Diff line number Diff line change @@ -161,7 +161,7 @@ fn object_safety_violations_for_trait(
161
161
. in_definition_order ( )
162
162
. filter ( |item| item. kind == ty:: AssocKind :: Type )
163
163
. filter ( |item| !tcx. generics_of ( item. def_id ) . params . is_empty ( ) )
164
- . filter ( |item| tcx . opt_rpitit_info ( item. def_id ) . is_none ( ) )
164
+ . filter ( |item| item. opt_rpitit_info . is_none ( ) )
165
165
. map ( |item| {
166
166
let ident = item. ident ( tcx) ;
167
167
ObjectSafetyViolation :: GAT ( ident. name , ident. span )
You can’t perform that action at this time.
0 commit comments