]> git.lizzy.rs Git - rust.git/commitdiff
Remove dependence on typeck from ppaux.
authorNiko Matsakis <niko@alum.mit.edu>
Wed, 26 Nov 2014 01:15:58 +0000 (20:15 -0500)
committerNiko Matsakis <niko@alum.mit.edu>
Thu, 4 Dec 2014 15:04:51 +0000 (10:04 -0500)
src/librustc/middle/infer/region_inference/doc.rs
src/librustc/middle/typeck/check/regionmanip.rs
src/librustc/util/ppaux.rs

index b4eac4c002677cdd87695a8d78ef60c0caf4ec20..686174b73060b85d762c831303ba1b166feb349a 100644 (file)
 //! ### 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`.
index 55214618aa90b5856bb8968487e07e45ae44617a..92dfd8b5f56d272842fa9cb6ce563f82ada53fd2 100644 (file)
@@ -380,3 +380,22 @@ fn accumulate_from_object_ty(&mut self,
         }
     }
 }
+
+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))
+            }
+        }
+    }
+}
+
index 1dfedd4c85c06ef455a71dffc3f6dd3bc949b679..1283e89c29d0cdf79b02e1724ff50d2426330deb 100644 (file)
@@ -23,7 +23,6 @@
 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 @@ fn repr(&self, _: &ctxt) -> String {
     }
 }
 
-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;