about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2014-11-25 20:15:58 -0500
committerNiko Matsakis <niko@alum.mit.edu>2014-12-04 10:04:51 -0500
commit9aeaaab3347657375e4d20855f8faebb2ab128da (patch)
tree6f28201d2b2bed1890a7e3279cca814b7cc2b018
parentadda9c152096459bd9925114e7c742619939ac49 (diff)
downloadrust-9aeaaab3347657375e4d20855f8faebb2ab128da.tar.gz
rust-9aeaaab3347657375e4d20855f8faebb2ab128da.zip
Remove dependence on typeck from ppaux.
-rw-r--r--src/librustc/middle/infer/region_inference/doc.rs2
-rw-r--r--src/librustc/middle/typeck/check/regionmanip.rs19
-rw-r--r--src/librustc/util/ppaux.rs19
3 files changed, 20 insertions, 20 deletions
diff --git a/src/librustc/middle/infer/region_inference/doc.rs b/src/librustc/middle/infer/region_inference/doc.rs
index b4eac4c0026..686174b7306 100644
--- a/src/librustc/middle/infer/region_inference/doc.rs
+++ b/src/librustc/middle/infer/region_inference/doc.rs
@@ -371,4 +371,4 @@
 //! ### Skolemization
 //!
 //! For a discussion on skolemization and higher-ranked subtyping, please
-//! see the module `middle::typeck::infer::higher_ranked::doc`.
+//! see the module `middle::infer::higher_ranked::doc`.
diff --git a/src/librustc/middle/typeck/check/regionmanip.rs b/src/librustc/middle/typeck/check/regionmanip.rs
index 55214618aa9..92dfd8b5f56 100644
--- a/src/librustc/middle/typeck/check/regionmanip.rs
+++ b/src/librustc/middle/typeck/check/regionmanip.rs
@@ -380,3 +380,22 @@ impl<'a, 'tcx> Wf<'a, 'tcx> {
         }
     }
 }
+
+impl<'tcx> Repr<'tcx> for WfConstraint<'tcx> {
+    fn repr(&self, tcx: &ty::ctxt) -> String {
+        match *self {
+            RegionSubRegionConstraint(_, r_a, r_b) => {
+                format!("RegionSubRegionConstraint({}, {})",
+                        r_a.repr(tcx),
+                        r_b.repr(tcx))
+            }
+
+            RegionSubParamConstraint(_, r, p) => {
+                format!("RegionSubParamConstraint({}, {})",
+                        r.repr(tcx),
+                        p.repr(tcx))
+            }
+        }
+    }
+}
+
diff --git a/src/librustc/util/ppaux.rs b/src/librustc/util/ppaux.rs
index 1dfedd4c85c..1283e89c29d 100644
--- a/src/librustc/util/ppaux.rs
+++ b/src/librustc/util/ppaux.rs
@@ -23,7 +23,6 @@ use middle::ty::{ty_param, ty_ptr, ty_rptr, ty_tup, ty_open};
 use middle::ty::{ty_unboxed_closure};
 use middle::ty::{ty_uniq, ty_trait, ty_int, ty_uint, ty_infer};
 use middle::ty;
-use middle::typeck::check::regionmanip;
 
 use std::rc::Rc;
 use syntax::abi;
@@ -1292,24 +1291,6 @@ impl<'tcx> Repr<'tcx> for ty::ExplicitSelfCategory {
     }
 }
 
-impl<'tcx> Repr<'tcx> for regionmanip::WfConstraint<'tcx> {
-    fn repr(&self, tcx: &ctxt) -> String {
-        match *self {
-            regionmanip::RegionSubRegionConstraint(_, r_a, r_b) => {
-                format!("RegionSubRegionConstraint({}, {})",
-                        r_a.repr(tcx),
-                        r_b.repr(tcx))
-            }
-
-            regionmanip::RegionSubParamConstraint(_, r, p) => {
-                format!("RegionSubParamConstraint({}, {})",
-                        r.repr(tcx),
-                        p.repr(tcx))
-            }
-        }
-    }
-}
-
 impl<'tcx> UserString<'tcx> for ParamTy {
     fn user_string(&self, tcx: &ctxt) -> String {
         let id = self.idx;