@@ -34,7 +34,7 @@ use rustc_infer::traits::ObligationCause;
34
34
use rustc_middle:: hir:: nested_filter;
35
35
use rustc_middle:: query:: Providers ;
36
36
use rustc_middle:: ty:: util:: { Discr , IntTypeExt } ;
37
- use rustc_middle:: ty:: { self , AdtKind , Const , IsSuggestable , Ty , TyCtxt , Upcast } ;
37
+ use rustc_middle:: ty:: { self , AdtKind , Const , IsSuggestable , Ty , TyCtxt } ;
38
38
use rustc_middle:: { bug, span_bug} ;
39
39
use rustc_span:: symbol:: { kw, sym, Ident , Symbol } ;
40
40
use rustc_span:: { Span , DUMMY_SP } ;
@@ -70,7 +70,6 @@ pub fn provide(providers: &mut Providers) {
70
70
impl_super_outlives : item_bounds:: impl_super_outlives,
71
71
generics_of : generics_of:: generics_of,
72
72
predicates_of : predicates_of:: predicates_of,
73
- predicates_defined_on,
74
73
explicit_predicates_of : predicates_of:: explicit_predicates_of,
75
74
explicit_super_predicates_of : predicates_of:: explicit_super_predicates_of,
76
75
explicit_implied_predicates_of : predicates_of:: explicit_implied_predicates_of,
@@ -1775,34 +1774,6 @@ fn early_bound_lifetimes_from_generics<'a, 'tcx: 'a>(
1775
1774
} )
1776
1775
}
1777
1776
1778
- /// Returns a list of type predicates for the definition with ID `def_id`, including inferred
1779
- /// lifetime constraints. This includes all predicates returned by `explicit_predicates_of`, plus
1780
- /// inferred constraints concerning which regions outlive other regions.
1781
- #[ instrument( level = "debug" , skip( tcx) ) ]
1782
- fn predicates_defined_on ( tcx : TyCtxt < ' _ > , def_id : DefId ) -> ty:: GenericPredicates < ' _ > {
1783
- let mut result = tcx. explicit_predicates_of ( def_id) ;
1784
- debug ! ( "predicates_defined_on: explicit_predicates_of({:?}) = {:?}" , def_id, result) ;
1785
- let inferred_outlives = tcx. inferred_outlives_of ( def_id) ;
1786
- if !inferred_outlives. is_empty ( ) {
1787
- debug ! (
1788
- "predicates_defined_on: inferred_outlives_of({:?}) = {:?}" ,
1789
- def_id, inferred_outlives,
1790
- ) ;
1791
- let inferred_outlives_iter =
1792
- inferred_outlives. iter ( ) . map ( |( clause, span) | ( ( * clause) . upcast ( tcx) , * span) ) ;
1793
- if result. predicates . is_empty ( ) {
1794
- result. predicates = tcx. arena . alloc_from_iter ( inferred_outlives_iter) ;
1795
- } else {
1796
- result. predicates = tcx. arena . alloc_from_iter (
1797
- result. predicates . into_iter ( ) . copied ( ) . chain ( inferred_outlives_iter) ,
1798
- ) ;
1799
- }
1800
- }
1801
-
1802
- debug ! ( "predicates_defined_on({:?}) = {:?}" , def_id, result) ;
1803
- result
1804
- }
1805
-
1806
1777
fn compute_sig_of_foreign_fn_decl < ' tcx > (
1807
1778
tcx : TyCtxt < ' tcx > ,
1808
1779
def_id : LocalDefId ,
0 commit comments