0
};
- for t in tps[..(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][]
},
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))
}