diff options
| author | lcnr <rust@lcnr.de> | 2022-01-03 11:59:01 +0100 |
|---|---|---|
| committer | lcnr <rust@lcnr.de> | 2022-01-03 11:59:01 +0100 |
| commit | a02bf76c9667ad7a25df3b672b3748398451a3d0 (patch) | |
| tree | a2bb1ddc87ec12c9624b63e2d4db0ac2ad3e3c9a | |
| parent | 484dc1f7a25f05550b3248ee09415ceecdf013e7 (diff) | |
| download | rust-a02bf76c9667ad7a25df3b672b3748398451a3d0.tar.gz rust-a02bf76c9667ad7a25df3b672b3748398451a3d0.zip | |
review
| -rw-r--r-- | compiler/rustc_save_analysis/src/sig.rs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/compiler/rustc_save_analysis/src/sig.rs b/compiler/rustc_save_analysis/src/sig.rs index 5d0de444199..4971bb6d1aa 100644 --- a/compiler/rustc_save_analysis/src/sig.rs +++ b/compiler/rustc_save_analysis/src/sig.rs @@ -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)) } |
