about summary refs log tree commit diff
diff options
context:
space:
mode:
authorclubby789 <jamie@hill-daniel.co.uk>2024-11-11 16:51:39 +0000
committerclubby789 <jamie@hill-daniel.co.uk>2024-11-12 13:28:05 +0000
commit8c64e9d17dad7d6e8a9f00191d8f55bd14b44aef (patch)
tree379da6d142036520f3f2eca73ce10f5b00b40b22
parent12036830d039134c447a1d7299a59560cd4a39d0 (diff)
downloadrust-8c64e9d17dad7d6e8a9f00191d8f55bd14b44aef.tar.gz
rust-8c64e9d17dad7d6e8a9f00191d8f55bd14b44aef.zip
Rename `PASS_NAMES` to disambiguate
-rw-r--r--compiler/rustc_mir_transform/src/pass_manager.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/rustc_mir_transform/src/pass_manager.rs b/compiler/rustc_mir_transform/src/pass_manager.rs
index e26e0c78b29..779e7f22101 100644
--- a/compiler/rustc_mir_transform/src/pass_manager.rs
+++ b/compiler/rustc_mir_transform/src/pass_manager.rs
@@ -11,14 +11,15 @@ use crate::lint::lint_body;
 use crate::{errors, validate};
 
 thread_local! {
-    static PASS_NAMES: RefCell<FxHashMap<&'static str, &'static str>> = {
+    /// Maps MIR pass names to a snake case form to match profiling naming style
+    static PASS_TO_PROFILER_NAMES: RefCell<FxHashMap<&'static str, &'static str>> = {
         RefCell::new(FxHashMap::default())
     };
 }
 
 /// Converts a MIR pass name into a snake case form to match the profiling naming style.
 fn to_profiler_name(type_name: &'static str) -> &'static str {
-    PASS_NAMES.with(|names| match names.borrow_mut().entry(type_name) {
+    PASS_TO_PROFILER_NAMES.with(|names| match names.borrow_mut().entry(type_name) {
         Entry::Occupied(e) => *e.get(),
         Entry::Vacant(e) => {
             let snake_case: String = type_name