hir: Remove opt_local_def_id_to_hir_id
and opt_hir_node_by_def_id
Also replace a few `hir_node()` calls with `hir_node_by_def_id()`
This commit is contained in:
parent
30f74ff0dc
commit
89b536dbc8
37 changed files with 135 additions and 199 deletions
|
@ -319,11 +319,7 @@ fn associated_type_for_impl_trait_in_impl(
|
|||
) -> LocalDefId {
|
||||
let impl_local_def_id = tcx.local_parent(impl_fn_def_id);
|
||||
|
||||
let decl = tcx
|
||||
.opt_hir_node_by_def_id(impl_fn_def_id)
|
||||
.expect("expected item")
|
||||
.fn_decl()
|
||||
.expect("expected decl");
|
||||
let decl = tcx.hir_node_by_def_id(impl_fn_def_id).fn_decl().expect("expected decl");
|
||||
let span = match decl.output {
|
||||
hir::FnRetTy::DefaultReturn(_) => tcx.def_span(impl_fn_def_id),
|
||||
hir::FnRetTy::Return(ty) => ty.span,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue