@@ -128,17 +128,13 @@ bitflags::bitflags! {
128128 Self :: QUERY_PROVIDERS . bits |
129129 Self :: QUERY_BLOCKED . bits |
130130 Self :: INCR_CACHE_LOADS . bits;
131-
132- // empty() and none() aren't const-fns unfortunately
133- const NONE = 0 ;
134- const ALL = !Self :: NONE . bits;
135131 }
136132}
137133
138134// keep this in sync with the `-Z self-profile-events` help message in librustc_session/options.rs
139135const EVENT_FILTERS_BY_NAME : & [ ( & str , EventFilter ) ] = & [
140- ( "none" , EventFilter :: NONE ) ,
141- ( "all" , EventFilter :: ALL ) ,
136+ ( "none" , EventFilter :: empty ( ) ) ,
137+ ( "all" , EventFilter :: all ( ) ) ,
142138 ( "default" , EventFilter :: DEFAULT ) ,
143139 ( "generic-activity" , EventFilter :: GENERIC_ACTIVITIES ) ,
144140 ( "query-provider" , EventFilter :: QUERY_PROVIDERS ) ,
@@ -180,7 +176,7 @@ impl SelfProfilerRef {
180176 // If there is no SelfProfiler then the filter mask is set to NONE,
181177 // ensuring that nothing ever tries to actually access it.
182178 let event_filter_mask =
183- profiler. as_ref ( ) . map ( |p| p. event_filter_mask ) . unwrap_or ( EventFilter :: NONE ) ;
179+ profiler. as_ref ( ) . map ( |p| p. event_filter_mask ) . unwrap_or ( EventFilter :: empty ( ) ) ;
184180
185181 SelfProfilerRef {
186182 profiler,
0 commit comments