Skip to content

Commit a02bf76

Browse files
committed
review
1 parent 484dc1f commit a02bf76

File tree

1 file changed

+1
-5
lines changed
  • compiler/rustc_save_analysis/src

1 file changed

+1
-5
lines changed

compiler/rustc_save_analysis/src/sig.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -312,11 +312,7 @@ impl<'hir> Sig for hir::Ty<'hir> {
312312
}
313313
hir::TyKind::Array(ref ty, ref length) => {
314314
let nested_ty = ty.make(offset + 1, id, scx)?;
315-
let hir_id = match length {
316-
&hir::ArrayLen::Infer(hir_id, _) => hir_id,
317-
hir::ArrayLen::Body(anon_const) => anon_const.hir_id,
318-
};
319-
let expr = id_to_string(&scx.tcx.hir(), hir_id).replace('\n', " ");
315+
let expr = id_to_string(&scx.tcx.hir(), length.hir_id()).replace('\n', " ");
320316
let text = format!("[{}; {}]", nested_ty.text, expr);
321317
Ok(replace_text(nested_ty, text))
322318
}

0 commit comments

Comments
 (0)