about summary refs log tree commit diff
path: root/clippy_lints/src/missing_inline.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-10-29 03:08:59 +0000
committerbors <bors@rust-lang.org>2022-10-29 03:08:59 +0000
commit26eeeeec7610e45975745a60226dc8a980ed684e (patch)
tree865cdba4f8b731c829966ba25a22908c6b1ff442 /clippy_lints/src/missing_inline.rs
parent678e67590a604aa65f9daed0bc7dcc22ed84796c (diff)
parent45c000bbc70174e4b093b7fbcd1bfd10c0bbd170 (diff)
downloadrust-26eeeeec7610e45975745a60226dc8a980ed684e.tar.gz
rust-26eeeeec7610e45975745a60226dc8a980ed684e.zip
Auto merge of #102233 - petrochenkov:effvis, r=jackh726
privacy: Rename "accessibility levels" to "effective visibilities"

And a couple of other naming and comment tweaks.

Related to https://github.com/rust-lang/rust/issues/48054

For `enum Level` I initially used naming `enum EffectiveVisibilityLevel`, but it was too long and inconvenient because it's used pretty often.
So I shortened it to just `Level`, if it needs to be used from some context where this name would be ambiguous, then it can be imported with renaming like `use rustc_middle::privacy::Level as EffVisLevel` or something.
Diffstat (limited to 'clippy_lints/src/missing_inline.rs')
-rw-r--r--clippy_lints/src/missing_inline.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/clippy_lints/src/missing_inline.rs b/clippy_lints/src/missing_inline.rs
index 01c87f058ad..ed9da2d9217 100644
--- a/clippy_lints/src/missing_inline.rs
+++ b/clippy_lints/src/missing_inline.rs
@@ -88,7 +88,7 @@ impl<'tcx> LateLintPass<'tcx> for MissingInline {
             return;
         }
 
-        if !cx.access_levels.is_exported(it.def_id.def_id) {
+        if !cx.effective_visibilities.is_exported(it.def_id.def_id) {
             return;
         }
         match it.kind {
@@ -142,7 +142,7 @@ impl<'tcx> LateLintPass<'tcx> for MissingInline {
         }
 
         // If the item being implemented is not exported, then we don't need #[inline]
-        if !cx.access_levels.is_exported(impl_item.def_id.def_id) {
+        if !cx.effective_visibilities.is_exported(impl_item.def_id.def_id) {
             return;
         }
 
@@ -159,7 +159,7 @@ impl<'tcx> LateLintPass<'tcx> for MissingInline {
         };
 
         if let Some(trait_def_id) = trait_def_id {
-            if trait_def_id.is_local() && !cx.access_levels.is_exported(impl_item.def_id.def_id) {
+            if trait_def_id.is_local() && !cx.effective_visibilities.is_exported(impl_item.def_id.def_id) {
                 // If a trait is being implemented for an item, and the
                 // trait is not exported, we don't need #[inline]
                 return;