about summary refs log tree commit diff
path: root/compiler/rustc_middle/src
diff options
context:
space:
mode:
authorCameron Steffen <cam.steffen94@gmail.com>2025-07-24 19:09:05 -0500
committerCameron Steffen <cam.steffen94@gmail.com>2025-07-28 09:54:53 -0500
commitb43164cef643957f9e1cd20dffdbb736f3f3c298 (patch)
treea9a3c85b1bf781fbb20d5a78365c90c73dce7d0c /compiler/rustc_middle/src
parent172af038a733020ec487d57a593ddb27ce16c325 (diff)
downloadrust-b43164cef643957f9e1cd20dffdbb736f3f3c298.tar.gz
rust-b43164cef643957f9e1cd20dffdbb736f3f3c298.zip
Rename impl_of_method -> impl_of_assoc
Diffstat (limited to 'compiler/rustc_middle/src')
-rw-r--r--compiler/rustc_middle/src/middle/privacy.rs2
-rw-r--r--compiler/rustc_middle/src/ty/mod.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_middle/src/middle/privacy.rs b/compiler/rustc_middle/src/middle/privacy.rs
index 03549091d62..785ddd1ee29 100644
--- a/compiler/rustc_middle/src/middle/privacy.rs
+++ b/compiler/rustc_middle/src/middle/privacy.rs
@@ -182,7 +182,7 @@ impl EffectiveVisibilities {
             // don't check this condition for them.
             let is_impl = matches!(tcx.def_kind(def_id), DefKind::Impl { .. });
             let is_associated_item_in_trait_impl = tcx
-                .impl_of_method(def_id.to_def_id())
+                .impl_of_assoc(def_id.to_def_id())
                 .and_then(|impl_id| tcx.trait_id_of_impl(impl_id))
                 .is_some();
             if !is_impl && !is_associated_item_in_trait_impl {
diff --git a/compiler/rustc_middle/src/ty/mod.rs b/compiler/rustc_middle/src/ty/mod.rs
index 2e4bad290d7..1119e60be85 100644
--- a/compiler/rustc_middle/src/ty/mod.rs
+++ b/compiler/rustc_middle/src/ty/mod.rs
@@ -2002,7 +2002,7 @@ impl<'tcx> TyCtxt<'tcx> {
 
     /// If the given `DefId` describes a method belonging to an impl, returns the
     /// `DefId` of the impl that the method belongs to; otherwise, returns `None`.
-    pub fn impl_of_method(self, def_id: DefId) -> Option<DefId> {
+    pub fn impl_of_assoc(self, def_id: DefId) -> Option<DefId> {
         self.assoc_parent(def_id).filter(|id| matches!(self.def_kind(id), DefKind::Impl { .. }))
     }