1
Fork 0

Rename local_did to def_id

Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
This commit is contained in:
Miguel Guarniz 2022-07-19 17:06:52 -04:00
parent 25bdc8965e
commit 16513d689e
9 changed files with 28 additions and 24 deletions

View file

@ -157,9 +157,9 @@ pub fn provide(providers: &mut Providers) {
};
providers.fn_arg_names = |tcx, id| {
let hir = tcx.hir();
let local_did = id.expect_local();
let hir_id = hir.local_def_id_to_hir_id(local_did);
if let Some(body_id) = hir.maybe_body_owned_by(local_did) {
let def_id = id.expect_local();
let hir_id = hir.local_def_id_to_hir_id(def_id);
if let Some(body_id) = hir.maybe_body_owned_by(def_id) {
tcx.arena.alloc_from_iter(hir.body_param_names(body_id))
} else if let Node::TraitItem(&TraitItem {
kind: TraitItemKind::Fn(_, TraitFn::Required(idents)),