Skip to content

Commit

Permalink
review
Browse files Browse the repository at this point in the history
  • Loading branch information
lcnr committed Jan 3, 2022
1 parent 484dc1f commit a02bf76
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions compiler/rustc_save_analysis/src/sig.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
Expand Down

0 comments on commit a02bf76

Please sign in to comment.