Skip to content

Commit 8e6b10a

Browse files
committed
move check to the top of the file, where I would expect to find it
Top-down, top-down!
1 parent 1a87fc2 commit 8e6b10a

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/librustc_typeck/coherence/inherent.rs

+7-6
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,13 @@ use rustc::ty::{self, TyCtxt};
1919
use syntax::ast;
2020
use syntax_pos::Span;
2121

22+
pub fn check<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>) {
23+
tcx.visit_all_item_likes_in_krate(DepNode::CoherenceCheckImpl,
24+
&mut InherentCollect { tcx });
25+
tcx.visit_all_item_likes_in_krate(DepNode::CoherenceOverlapCheckSpecial,
26+
&mut InherentOverlapChecker { tcx });
27+
}
28+
2229
struct InherentCollect<'a, 'tcx: 'a> {
2330
tcx: TyCtxt<'a, 'tcx, 'tcx>
2431
}
@@ -348,9 +355,3 @@ impl<'a, 'tcx, 'v> ItemLikeVisitor<'v> for InherentOverlapChecker<'a, 'tcx> {
348355
}
349356
}
350357

351-
pub fn check<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>) {
352-
tcx.visit_all_item_likes_in_krate(DepNode::CoherenceCheckImpl,
353-
&mut InherentCollect { tcx });
354-
tcx.visit_all_item_likes_in_krate(DepNode::CoherenceOverlapCheckSpecial,
355-
&mut InherentOverlapChecker { tcx });
356-
}

0 commit comments

Comments
 (0)