We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 484dc1f commit a02bf76Copy full SHA for a02bf76
compiler/rustc_save_analysis/src/sig.rs
@@ -312,11 +312,7 @@ impl<'hir> Sig for hir::Ty<'hir> {
312
}
313
hir::TyKind::Array(ref ty, ref length) => {
314
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', " ");
+ let expr = id_to_string(&scx.tcx.hir(), length.hir_id()).replace('\n', " ");
320
let text = format!("[{}; {}]", nested_ty.text, expr);
321
Ok(replace_text(nested_ty, text))
322
0 commit comments