File tree 1 file changed +3
-2
lines changed
compiler/rustc_mir_transform/src
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -11,14 +11,15 @@ use crate::lint::lint_body;
11
11
use crate :: { errors, validate} ;
12
12
13
13
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 >> = {
15
16
RefCell :: new( FxHashMap :: default ( ) )
16
17
} ;
17
18
}
18
19
19
20
/// Converts a MIR pass name into a snake case form to match the profiling naming style.
20
21
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) {
22
23
Entry :: Occupied ( e) => * e. get ( ) ,
23
24
Entry :: Vacant ( e) => {
24
25
let snake_case: String = type_name
You can’t perform that action at this time.
0 commit comments