about summary refs log tree commit diff
path: root/compiler/rustc_lint/src/traits.rs
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_lint/src/traits.rs
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_lint/src/traits.rs')
-rw-r--r--compiler/rustc_lint/src/traits.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_lint/src/traits.rs b/compiler/rustc_lint/src/traits.rs
index a118dda8b40..f22f38aa2ce 100644
--- a/compiler/rustc_lint/src/traits.rs
+++ b/compiler/rustc_lint/src/traits.rs
@@ -89,7 +89,7 @@ impl<'tcx> LateLintPass<'tcx> for DropTraitConstraints {
     fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx hir::Item<'tcx>) {
         use rustc_middle::ty::PredicateKind::*;
 
-        let predicates = cx.tcx.explicit_predicates_of(item.def_id);
+        let predicates = cx.tcx.explicit_predicates_of(item.owner_id);
         for &(predicate, span) in predicates.predicates {
             let Trait(trait_predicate) = predicate.kind().skip_binder() else {
                 continue