@@ -22,7 +22,6 @@ use syntax::ast;
2222use rustc:: hir;
2323use rustc:: hir:: itemlikevisit:: ItemLikeVisitor ;
2424
25- use rustc_data_structures:: transitive_relation:: TransitiveRelation ;
2625use rustc_data_structures:: stable_hasher:: StableHashingContextProvider ;
2726
2827use super :: terms:: * ;
@@ -38,11 +37,6 @@ pub struct ConstraintContext<'a, 'tcx: 'a> {
3837 bivariant : VarianceTermPtr < ' a > ,
3938
4039 pub constraints : Vec < Constraint < ' a > > ,
41-
42- /// This relation tracks the dependencies between the variance of
43- /// various items. In particular, if `a < b`, then the variance of
44- /// `a` depends on the sources of `b`.
45- pub dependencies : TransitiveRelation < DefId > ,
4640}
4741
4842/// Declares that the variable `decl_id` appears in a location with
@@ -63,7 +57,6 @@ pub struct Constraint<'a> {
6357/// then while we are visiting `Bar<T>`, the `CurrentItem` would have
6458/// the def-id and the start of `Foo`'s inferreds.
6559pub struct CurrentItem {
66- def_id : DefId ,
6760 inferred_start : InferredIndex ,
6861}
6962
@@ -81,7 +74,6 @@ pub fn add_constraints_from_crate<'a, 'tcx>(terms_cx: TermsContext<'a, 'tcx>)
8174 invariant,
8275 bivariant,
8376 constraints : Vec :: new ( ) ,
84- dependencies : TransitiveRelation :: new ( ) ,
8577 } ;
8678
8779 tcx. hir . krate ( ) . visit_all_item_likes ( & mut constraint_cx) ;
@@ -201,7 +193,7 @@ impl<'a, 'tcx> ConstraintContext<'a, 'tcx> {
201193
202194 let id = tcx. hir . as_local_node_id ( def_id) . unwrap ( ) ;
203195 let inferred_start = self . terms_cx . inferred_starts [ & id] ;
204- let current_item = & CurrentItem { def_id , inferred_start } ;
196+ let current_item = & CurrentItem { inferred_start } ;
205197 match tcx. type_of ( def_id) . sty {
206198 ty:: TyAdt ( def, _) => {
207199 // Not entirely obvious: constraints on structs/enums do not
@@ -410,12 +402,6 @@ impl<'a, 'tcx> ConstraintContext<'a, 'tcx> {
410402 return ;
411403 }
412404
413- // Add a corresponding relation into the dependencies to
414- // indicate that the variance for `current` relies on `def_id`.
415- if self . tcx ( ) . dep_graph . is_fully_enabled ( ) {
416- self . dependencies . add ( current. def_id , def_id) ;
417- }
418-
419405 let ( local, remote) = if let Some ( id) = self . tcx ( ) . hir . as_local_node_id ( def_id) {
420406 ( Some ( self . terms_cx . inferred_starts [ & id] ) , None )
421407 } else {
0 commit comments