about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2017-03-20 16:43:54 -0400
committerNiko Matsakis <niko@alum.mit.edu>2017-03-23 13:25:45 -0400
commit8e6b10a6cb349deab30fa0fb507a8c73cae6ec68 (patch)
treed8252e8774895742f3543e464e42a38b3fbcd94f /src
parent1a87fc2635660bbf2947c17901dbd7dec75a63cb (diff)
downloadrust-8e6b10a6cb349deab30fa0fb507a8c73cae6ec68.tar.gz
rust-8e6b10a6cb349deab30fa0fb507a8c73cae6ec68.zip
move `check` to the top of the file, where I would expect to find it
Top-down, top-down!
Diffstat (limited to 'src')
-rw-r--r--src/librustc_typeck/coherence/inherent.rs13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/librustc_typeck/coherence/inherent.rs b/src/librustc_typeck/coherence/inherent.rs
index e3b4ba9eb1b..9abf233de1f 100644
--- a/src/librustc_typeck/coherence/inherent.rs
+++ b/src/librustc_typeck/coherence/inherent.rs
@@ -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 });
-}