Arguments {
values: self.0.iter().enumerate().map(|(i, ty)| {
+ let original_pat = cx.tcx.hir().original_pat_of_argument(&body.arguments[i]);
Argument {
- name: name_from_pat(&body.arguments[i].original_pat()),
+ name: name_from_pat(original_pat),
type_: ty.clean(cx),
}
}).collect()
fn clean(&self, cx: &DocContext<'_>) -> Constant {
Constant {
type_: self.ty.clean(cx),
- expr: match self.val {
- ConstValue::Param(ty::ParamConst { name, .. }) => format!("{}", name),
- e => format!("{:?}", e), // FIXME generic consts with expressions
- },
+ expr: format!("{}", self),
}
}
}