about summary refs log tree commit diff
path: root/compiler/rustc_interface
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2022-10-27 14:02:18 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2022-10-29 20:28:38 +1100
commitc8c25ce5a15f3f50439b1d746fd507c6e28abe18 (patch)
treecd3cfcb3970619de6f8c4bdc31838ba24681d1ca /compiler/rustc_interface
parent33b55ac39fa633d0983fad014469e1036669bf28 (diff)
downloadrust-c8c25ce5a15f3f50439b1d746fd507c6e28abe18.tar.gz
rust-c8c25ce5a15f3f50439b1d746fd507c6e28abe18.zip
Rename some `OwnerId` fields.
spastorino noticed some silly expressions like `item_id.def_id.def_id`.

This commit renames several `def_id: OwnerId` fields as `owner_id`, so
those expressions become `item_id.owner_id.def_id`.

`item_id.owner_id.local_def_id` would be even clearer, but the use of
`def_id` for values of type `LocalDefId` is *very* widespread, so I left
that alone.
Diffstat (limited to 'compiler/rustc_interface')
-rw-r--r--compiler/rustc_interface/src/proc_macro_decls.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_interface/src/proc_macro_decls.rs b/compiler/rustc_interface/src/proc_macro_decls.rs
index 2b1b931b732..4c236c693d0 100644
--- a/compiler/rustc_interface/src/proc_macro_decls.rs
+++ b/compiler/rustc_interface/src/proc_macro_decls.rs
@@ -9,7 +9,7 @@ fn proc_macro_decls_static(tcx: TyCtxt<'_>, (): ()) -> Option<LocalDefId> {
     for id in tcx.hir().items() {
         let attrs = finder.tcx.hir().attrs(id.hir_id());
         if finder.tcx.sess.contains_name(attrs, sym::rustc_proc_macro_decls) {
-            finder.decls = Some(id.def_id.def_id);
+            finder.decls = Some(id.owner_id.def_id);
         }
     }