move check to the top of the file, where I would expect to find it
Top-down, top-down!
This commit is contained in:
parent
1a87fc2635
commit
8e6b10a6cb
1 changed files with 7 additions and 6 deletions
|
|
@ -19,6 +19,13 @@ use rustc::ty::{self, TyCtxt};
|
|||
use syntax::ast;
|
||||
use syntax_pos::Span;
|
||||
|
||||
pub fn check<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>) {
|
||||
tcx.visit_all_item_likes_in_krate(DepNode::CoherenceCheckImpl,
|
||||
&mut InherentCollect { tcx });
|
||||
tcx.visit_all_item_likes_in_krate(DepNode::CoherenceOverlapCheckSpecial,
|
||||
&mut InherentOverlapChecker { tcx });
|
||||
}
|
||||
|
||||
struct InherentCollect<'a, 'tcx: 'a> {
|
||||
tcx: TyCtxt<'a, 'tcx, 'tcx>
|
||||
}
|
||||
|
|
@ -348,9 +355,3 @@ impl<'a, 'tcx, 'v> ItemLikeVisitor<'v> for InherentOverlapChecker<'a, 'tcx> {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn check<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>) {
|
||||
tcx.visit_all_item_likes_in_krate(DepNode::CoherenceCheckImpl,
|
||||
&mut InherentCollect { tcx });
|
||||
tcx.visit_all_item_likes_in_krate(DepNode::CoherenceOverlapCheckSpecial,
|
||||
&mut InherentOverlapChecker { tcx });
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue