@@ -842,7 +842,7 @@ impl<'cx, 'gcx, 'tcx> SelectionContext<'cx, 'gcx, 'tcx> {
842
842
fn filter_negative_impls ( & self , candidate : SelectionCandidate < ' tcx > )
843
843
-> SelectionResult < ' tcx , SelectionCandidate < ' tcx > > {
844
844
if let ImplCandidate ( def_id) = candidate {
845
- if self . tcx ( ) . trait_impl_polarity ( def_id) == hir:: ImplPolarity :: Negative {
845
+ if self . tcx ( ) . impl_polarity ( def_id) == hir:: ImplPolarity :: Negative {
846
846
return Err ( Unimplemented )
847
847
}
848
848
}
@@ -1222,8 +1222,8 @@ impl<'cx, 'gcx, 'tcx> SelectionContext<'cx, 'gcx, 'tcx> {
1222
1222
def_id={:?}, substs={:?}",
1223
1223
def_id, substs) ;
1224
1224
1225
- let item_predicates = self . tcx ( ) . item_predicates ( def_id) ;
1226
- let bounds = item_predicates . instantiate ( self . tcx ( ) , substs) ;
1225
+ let predicates_of = self . tcx ( ) . predicates_of ( def_id) ;
1226
+ let bounds = predicates_of . instantiate ( self . tcx ( ) , substs) ;
1227
1227
debug ! ( "match_projection_obligation_against_definition_bounds: \
1228
1228
bounds={:?}",
1229
1229
bounds) ;
@@ -1432,7 +1432,7 @@ impl<'cx, 'gcx, 'tcx> SelectionContext<'cx, 'gcx, 'tcx> {
1432
1432
{
1433
1433
debug ! ( "assemble_candidates_from_impls(obligation={:?})" , obligation) ;
1434
1434
1435
- let def = self . tcx ( ) . lookup_trait_def ( obligation. predicate . def_id ( ) ) ;
1435
+ let def = self . tcx ( ) . trait_def ( obligation. predicate . def_id ( ) ) ;
1436
1436
1437
1437
def. for_each_relevant_impl (
1438
1438
self . tcx ( ) ,
@@ -1947,7 +1947,7 @@ impl<'cx, 'gcx, 'tcx> SelectionContext<'cx, 'gcx, 'tcx> {
1947
1947
// We can resolve the `impl Trait` to its concrete type,
1948
1948
// which enforces a DAG between the functions requiring
1949
1949
// the auto trait bounds in question.
1950
- vec ! [ self . tcx( ) . item_type ( def_id) . subst( self . tcx( ) , substs) ]
1950
+ vec ! [ self . tcx( ) . type_of ( def_id) . subst( self . tcx( ) , substs) ]
1951
1951
}
1952
1952
}
1953
1953
}
@@ -2526,7 +2526,7 @@ impl<'cx, 'gcx, 'tcx> SelectionContext<'cx, 'gcx, 'tcx> {
2526
2526
( & ty:: TyAdt ( def, substs_a) , & ty:: TyAdt ( _, substs_b) ) => {
2527
2527
let fields = def
2528
2528
. all_fields ( )
2529
- . map ( |f| tcx. item_type ( f. did ) )
2529
+ . map ( |f| tcx. type_of ( f. did ) )
2530
2530
. collect :: < Vec < _ > > ( ) ;
2531
2531
2532
2532
// The last field of the structure has to exist and contain type parameters.
@@ -2844,7 +2844,7 @@ impl<'cx, 'gcx, 'tcx> SelectionContext<'cx, 'gcx, 'tcx> {
2844
2844
// obligation will normalize to `<$0 as Iterator>::Item = $1` and
2845
2845
// `$1: Copy`, so we must ensure the obligations are emitted in
2846
2846
// that order.
2847
- let predicates = tcx. item_predicates ( def_id) ;
2847
+ let predicates = tcx. predicates_of ( def_id) ;
2848
2848
assert_eq ! ( predicates. parent, None ) ;
2849
2849
let predicates = predicates. predicates . iter ( ) . flat_map ( |predicate| {
2850
2850
let predicate = normalize_with_depth ( self , cause. clone ( ) , recursion_depth,
0 commit comments