Remove dependence on typeck from ppaux.
This commit is contained in:
parent
adda9c1520
commit
9aeaaab334
@ -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`.
|
||||
|
@ -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))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user