1
Fork 0

Rollup merge of #101057 - cjgillot:one-fn-sig, r=compiler-errors

Merge implementations of HIR fn_decl and fn_sig.
This commit is contained in:
Yuki Okushi 2022-08-27 13:14:24 +09:00 committed by GitHub
commit aa6b750854
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 31 deletions

View file

@ -541,7 +541,7 @@ fn fn_sig_and_body<'tcx>(
// to HIR for it.
let hir_node = tcx.hir().get_if_local(def_id).expect("expected DefId is local");
let fn_body_id = hir::map::associated_body(hir_node).expect("HIR node is a function with body");
(hir::map::fn_sig(hir_node), tcx.hir().body(fn_body_id))
(hir_node.fn_sig(), tcx.hir().body(fn_body_id))
}
fn get_body_span<'tcx>(