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
|
@ -1339,8 +1339,8 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
|
|||
is_doc_hidden: false,
|
||||
};
|
||||
let attr_iter = tcx
|
||||
.opt_local_def_id_to_hir_id(def_id)
|
||||
.map_or(Default::default(), |hir_id| tcx.hir().attrs(hir_id))
|
||||
.hir()
|
||||
.attrs(tcx.local_def_id_to_hir_id(def_id))
|
||||
.iter()
|
||||
.filter(|attr| analyze_attr(attr, &mut state));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue