mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 22:41:50 +00:00
review
This commit is contained in:
parent
484dc1f7a2
commit
a02bf76c96
@ -312,11 +312,7 @@ impl<'hir> Sig for hir::Ty<'hir> {
|
||||
}
|
||||
hir::TyKind::Array(ref ty, ref length) => {
|
||||
let nested_ty = ty.make(offset + 1, id, scx)?;
|
||||
let hir_id = match length {
|
||||
&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 expr = id_to_string(&scx.tcx.hir(), length.hir_id()).replace('\n', " ");
|
||||
let text = format!("[{}; {}]", nested_ty.text, expr);
|
||||
Ok(replace_text(nested_ty, text))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user