File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
src/librustc_mir/transform/check_consts Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,9 @@ impl QualifSet {
2727pub trait Qualif {
2828 const IDX : usize ;
2929
30+ /// The name of the file used to debug the dataflow analysis that computes this qualif.
31+ const ANALYSIS_NAME : & ' static str ;
32+
3033 /// Whether this `Qualif` is cleared when a local is moved from.
3134 const IS_CLEARED_ON_MOVE : bool = false ;
3235
@@ -207,6 +210,7 @@ pub struct HasMutInterior;
207210
208211impl Qualif for HasMutInterior {
209212 const IDX : usize = 0 ;
213+ const ANALYSIS_NAME : & ' static str = "flow_has_mut_interior" ;
210214
211215 fn in_any_value_of_ty ( cx : & ConstCx < ' _ , ' tcx > , ty : Ty < ' tcx > ) -> bool {
212216 !ty. is_freeze ( cx. tcx , cx. param_env , DUMMY_SP )
@@ -264,6 +268,7 @@ pub struct NeedsDrop;
264268
265269impl Qualif for NeedsDrop {
266270 const IDX : usize = 1 ;
271+ const ANALYSIS_NAME : & ' static str = "flow_needs_drop" ;
267272 const IS_CLEARED_ON_MOVE : bool = true ;
268273
269274 fn in_any_value_of_ty ( cx : & ConstCx < ' _ , ' tcx > , ty : Ty < ' tcx > ) -> bool {
Original file line number Diff line number Diff line change @@ -309,7 +309,7 @@ where
309309{
310310 type Idx = Local ;
311311
312- const NAME : & ' static str = "flow_sensitive_qualif" ;
312+ const NAME : & ' static str = Q :: ANALYSIS_NAME ;
313313
314314 fn bits_per_block ( & self , body : & mir:: Body < ' tcx > ) -> usize {
315315 body. local_decls . len ( )
You can’t perform that action at this time.
0 commit comments