let print_regions = |f: &mut fmt::Formatter, start: &str, skip, count| {
// Don't print any regions if they're all erased.
let regions = || substs.regions().skip(skip).take(count);
- if regions().all(|r: &ty::Region| *r == ty::ReErased) {
+ if regions().all(|r: ty::Region| *r == ty::ReErased) {
return Ok(());
}
for region in regions() {
- let region: &ty::Region = region;
+ let region: ty::Region = region;
start_or_continue(f, start, ", ")?;
if verbose {
write!(f, "{:?}", region)?;
}
}
-impl<'tcx> fmt::Debug for ty::ItemSubsts<'tcx> {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- write!(f, "ItemSubsts({:?})", self.substs)
- }
-}
-
impl<'tcx> fmt::Debug for ty::TraitRef<'tcx> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
// when printing out the debug representation, we don't need
}
}
-impl fmt::Debug for ty::Region {
+impl fmt::Debug for ty::RegionKind {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
ty::ReEarlyBound(ref data) => {
}
}
-impl<'tcx> fmt::Debug for ty::ParameterEnvironment<'tcx> {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- write!(f, "ParameterEnvironment(\
- free_substs={:?}, \
- implicit_region_bound={:?}, \
- caller_bounds={:?})",
- self.free_substs,
- self.implicit_region_bound,
- self.caller_bounds)
- }
-}
-
-impl fmt::Display for ty::Region {
+impl fmt::Display for ty::RegionKind {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
if verbose() {
return write!(f, "{:?}", *self);
}
}
-impl<'tcx> fmt::Display for ty::Binder<ty::OutlivesPredicate<Ty<'tcx>, &'tcx ty::Region>> {
+impl<'tcx> fmt::Display for ty::Binder<ty::OutlivesPredicate<Ty<'tcx>, ty::Region<'tcx>>> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
ty::tls::with(|tcx| in_binder(f, tcx, self, tcx.lift(self)))
}
}
-impl<'tcx> fmt::Display for ty::Binder<ty::OutlivesPredicate<&'tcx ty::Region,
- &'tcx ty::Region>> {
+impl<'tcx> fmt::Display for ty::Binder<ty::OutlivesPredicate<ty::Region<'tcx>,
+ ty::Region<'tcx>>> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
ty::tls::with(|tcx| in_binder(f, tcx, self, tcx.lift(self)))
}