@@ -128,17 +128,13 @@ bitflags::bitflags! {
128
128
Self :: QUERY_PROVIDERS . bits |
129
129
Self :: QUERY_BLOCKED . bits |
130
130
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;
135
131
}
136
132
}
137
133
138
134
// keep this in sync with the `-Z self-profile-events` help message in librustc_session/options.rs
139
135
const EVENT_FILTERS_BY_NAME : & [ ( & str , EventFilter ) ] = & [
140
- ( "none" , EventFilter :: NONE ) ,
141
- ( "all" , EventFilter :: ALL ) ,
136
+ ( "none" , EventFilter :: empty ( ) ) ,
137
+ ( "all" , EventFilter :: all ( ) ) ,
142
138
( "default" , EventFilter :: DEFAULT ) ,
143
139
( "generic-activity" , EventFilter :: GENERIC_ACTIVITIES ) ,
144
140
( "query-provider" , EventFilter :: QUERY_PROVIDERS ) ,
@@ -180,7 +176,7 @@ impl SelfProfilerRef {
180
176
// If there is no SelfProfiler then the filter mask is set to NONE,
181
177
// ensuring that nothing ever tries to actually access it.
182
178
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 ( ) ) ;
184
180
185
181
SelfProfilerRef {
186
182
profiler,
0 commit comments