// The `Self` type is erased, so it should not appear in list of
// arguments or return type apart from the receiver.
let ref sig = method.fty.sig;
- for &input_ty in sig.0.inputs[1..].iter() {
+ for &input_ty in sig.0.inputs.index(&(1..)).iter() {
if contains_illegal_self_type_reference(tcx, trait_def_id, input_ty) {
return Some(MethodViolationCode::ReferencesSelf);
}
ObjectSafetyViolation::SizedSelf =>
format!("SizedSelf"),
ObjectSafetyViolation::Method(ref m, code) =>
- format!("Method({},{})", m.repr(tcx), code),
+ format!("Method({},{:?})", m.repr(tcx), code),
}
}
}