0
};
- for t in tps[0..(tps.len() - num_defaults)].iter() {
+ for t in tps[..tps.len() - num_defaults].iter() {
strs.push(ty_to_string(cx, *t))
}
format!("{}({}){}",
base,
if strs[0].starts_with("(") && strs[0].ends_with(",)") {
- &strs[0][1 .. (strs[0].len() - 2)] // Remove '(' and ',)'
+ &strs[0][1 .. strs[0].len() - 2] // Remove '(' and ',)'
} else if strs[0].starts_with("(") && strs[0].ends_with(")") {
- &strs[0][1 .. (strs[0].len() - 1)] // Remove '(' and ')'
+ &strs[0][1 .. strs[0].len() - 1] // Remove '(' and ')'
} else {
&strs[0][]
},
// the output. We'll probably want to tweak this over time to
// decide just how much information to give.
let mut names = Vec::new();
- let (unbound_value, _) = ty::replace_late_bound_regions(tcx, self, |br, debruijn| {
- ty::ReLateBound(debruijn, match br {
+ let (unbound_value, _) = ty::replace_late_bound_regions(tcx, self, |br| {
+ ty::ReLateBound(ty::DebruijnIndex::new(1), match br {
ty::BrNamed(_, name) => {
names.push(token::get_name(name));
br
impl<'tcx> Repr<'tcx> for ty::ProjectionTy<'tcx> {
fn repr(&self, tcx: &ctxt<'tcx>) -> String {
format!("<{} as {}>::{}",
- self.trait_ref.self_ty().repr(tcx),
+ self.trait_ref.substs.self_ty().repr(tcx),
self.trait_ref.repr(tcx),
self.item_name.repr(tcx))
}