File tree 2 files changed +6
-1
lines changed
src/librustc_mir/transform/check_consts
2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,9 @@ impl QualifSet {
27
27
pub trait Qualif {
28
28
const IDX : usize ;
29
29
30
+ /// The name of the file used to debug the dataflow analysis that computes this qualif.
31
+ const ANALYSIS_NAME : & ' static str ;
32
+
30
33
/// Whether this `Qualif` is cleared when a local is moved from.
31
34
const IS_CLEARED_ON_MOVE : bool = false ;
32
35
@@ -207,6 +210,7 @@ pub struct HasMutInterior;
207
210
208
211
impl Qualif for HasMutInterior {
209
212
const IDX : usize = 0 ;
213
+ const ANALYSIS_NAME : & ' static str = "flow_has_mut_interior" ;
210
214
211
215
fn in_any_value_of_ty ( cx : & ConstCx < ' _ , ' tcx > , ty : Ty < ' tcx > ) -> bool {
212
216
!ty. is_freeze ( cx. tcx , cx. param_env , DUMMY_SP )
@@ -264,6 +268,7 @@ pub struct NeedsDrop;
264
268
265
269
impl Qualif for NeedsDrop {
266
270
const IDX : usize = 1 ;
271
+ const ANALYSIS_NAME : & ' static str = "flow_needs_drop" ;
267
272
const IS_CLEARED_ON_MOVE : bool = true ;
268
273
269
274
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
309
309
{
310
310
type Idx = Local ;
311
311
312
- const NAME : & ' static str = "flow_sensitive_qualif" ;
312
+ const NAME : & ' static str = Q :: ANALYSIS_NAME ;
313
313
314
314
fn bits_per_block ( & self , body : & mir:: Body < ' tcx > ) -> usize {
315
315
body. local_decls . len ( )
You can’t perform that action at this time.
0 commit comments