review
This commit is contained in:
@@ -312,11 +312,7 @@ impl<'hir> Sig for hir::Ty<'hir> {
|
|||||||
}
|
}
|
||||||
hir::TyKind::Array(ref ty, ref length) => {
|
hir::TyKind::Array(ref ty, ref length) => {
|
||||||
let nested_ty = ty.make(offset + 1, id, scx)?;
|
let nested_ty = ty.make(offset + 1, id, scx)?;
|
||||||
let hir_id = match length {
|
let expr = id_to_string(&scx.tcx.hir(), length.hir_id()).replace('\n', " ");
|
||||||
&hir::ArrayLen::Infer(hir_id, _) => hir_id,
|
|
||||||
hir::ArrayLen::Body(anon_const) => anon_const.hir_id,
|
|
||||||
};
|
|
||||||
let expr = id_to_string(&scx.tcx.hir(), hir_id).replace('\n', " ");
|
|
||||||
let text = format!("[{}; {}]", nested_ty.text, expr);
|
let text = format!("[{}; {}]", nested_ty.text, expr);
|
||||||
Ok(replace_text(nested_ty, text))
|
Ok(replace_text(nested_ty, text))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user