Skip to content

Commit 8c64e9d

Browse files
committed
Rename PASS_NAMES to disambiguate
1 parent 1203683 commit 8c64e9d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

compiler/rustc_mir_transform/src/pass_manager.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,15 @@ use crate::lint::lint_body;
1111
use crate::{errors, validate};
1212

1313
thread_local! {
14-
static PASS_NAMES: RefCell<FxHashMap<&'static str, &'static str>> = {
14+
/// Maps MIR pass names to a snake case form to match profiling naming style
15+
static PASS_TO_PROFILER_NAMES: RefCell<FxHashMap<&'static str, &'static str>> = {
1516
RefCell::new(FxHashMap::default())
1617
};
1718
}
1819

1920
/// Converts a MIR pass name into a snake case form to match the profiling naming style.
2021
fn to_profiler_name(type_name: &'static str) -> &'static str {
21-
PASS_NAMES.with(|names| match names.borrow_mut().entry(type_name) {
22+
PASS_TO_PROFILER_NAMES.with(|names| match names.borrow_mut().entry(type_name) {
2223
Entry::Occupied(e) => *e.get(),
2324
Entry::Vacant(e) => {
2425
let snake_case: String = type_name

0 commit comments

Comments
 (0)