File tree Expand file tree Collapse file tree 3 files changed +15
-6
lines changed Expand file tree Collapse file tree 3 files changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -89,10 +89,13 @@ macro_rules! arc_pool {
8989 type Data = $data_type;
9090
9191 fn singleton( ) -> & ' static $crate:: pool:: arc:: ArcPoolImpl <$data_type> {
92- static POOL : $crate:: pool:: arc:: ArcPoolImpl <$data_type> =
92+ // Even though the static variable is not exposed to user code, it is
93+ // still useful to have a descriptive symbol name for debugging.
94+ #[ allow( non_upper_case_globals) ]
95+ static $name: $crate:: pool:: arc:: ArcPoolImpl <$data_type> =
9396 $crate:: pool:: arc:: ArcPoolImpl :: new( ) ;
9497
95- & POOL
98+ & $name
9699 }
97100 }
98101
Original file line number Diff line number Diff line change @@ -101,10 +101,13 @@ macro_rules! box_pool {
101101 type Data = $data_type;
102102
103103 fn singleton( ) -> & ' static $crate:: pool:: boxed:: BoxPoolImpl <$data_type> {
104- static POOL : $crate:: pool:: boxed:: BoxPoolImpl <$data_type> =
104+ // Even though the static variable is not exposed to user code, it is
105+ // still useful to have a descriptive symbol name for debugging.
106+ #[ allow( non_upper_case_globals) ]
107+ static $name: $crate:: pool:: boxed:: BoxPoolImpl <$data_type> =
105108 $crate:: pool:: boxed:: BoxPoolImpl :: new( ) ;
106109
107- & POOL
110+ & $name
108111 }
109112 }
110113
Original file line number Diff line number Diff line change @@ -88,10 +88,13 @@ macro_rules! object_pool {
8888 type Data = $data_type;
8989
9090 fn singleton( ) -> & ' static $crate:: pool:: object:: ObjectPoolImpl <$data_type> {
91- static POOL : $crate:: pool:: object:: ObjectPoolImpl <$data_type> =
91+ // Even though the static variable is not exposed to user code, it is
92+ // still useful to have a descriptive symbol name for debugging.
93+ #[ allow( non_upper_case_globals) ]
94+ static $name: $crate:: pool:: object:: ObjectPoolImpl <$data_type> =
9295 $crate:: pool:: object:: ObjectPoolImpl :: new( ) ;
9396
94- & POOL
97+ & $name
9598 }
9699 }
97100
You can’t perform that action at this time.
0 commit comments