@@ -6,8 +6,8 @@ use syntax_pos::DUMMY_SP;
6
6
7
7
use super :: { ConstKind , Item as ConstCx } ;
8
8
9
- pub fn in_any_value_of_ty ( cx : & ConstCx < ' _ , ' tcx > , ty : Ty < ' tcx > ) -> QualifSet {
10
- QualifSet {
9
+ pub fn in_any_value_of_ty ( cx : & ConstCx < ' _ , ' tcx > , ty : Ty < ' tcx > ) -> ConstQualifs {
10
+ ConstQualifs {
11
11
has_mut_interior : HasMutInterior :: in_any_value_of_ty ( cx, ty) ,
12
12
needs_drop : NeedsDrop :: in_any_value_of_ty ( cx, ty) ,
13
13
}
@@ -26,7 +26,7 @@ pub trait Qualif {
26
26
/// Whether this `Qualif` is cleared when a local is moved from.
27
27
const IS_CLEARED_ON_MOVE : bool = false ;
28
28
29
- fn in_qualif_set ( set : & QualifSet ) -> bool ;
29
+ fn in_qualifs ( qualifs : & ConstQualifs ) -> bool ;
30
30
31
31
/// Return the qualification that is (conservatively) correct for any value
32
32
/// of the type.
@@ -121,7 +121,7 @@ pub trait Qualif {
121
121
Self :: in_any_value_of_ty ( cx, constant. literal . ty )
122
122
} else {
123
123
let qualifs = cx. tcx . at ( constant. span ) . mir_const_qualif ( def_id) ;
124
- let qualif = Self :: in_qualif_set ( & qualifs) ;
124
+ let qualif = Self :: in_qualifs ( & qualifs) ;
125
125
126
126
// Just in case the type is more specific than
127
127
// the definition, e.g., impl associated const
@@ -209,8 +209,8 @@ pub struct HasMutInterior;
209
209
impl Qualif for HasMutInterior {
210
210
const ANALYSIS_NAME : & ' static str = "flow_has_mut_interior" ;
211
211
212
- fn in_qualif_set ( set : & QualifSet ) -> bool {
213
- set . has_mut_interior
212
+ fn in_qualifs ( qualifs : & ConstQualifs ) -> bool {
213
+ qualifs . has_mut_interior
214
214
}
215
215
216
216
fn in_any_value_of_ty ( cx : & ConstCx < ' _ , ' tcx > , ty : Ty < ' tcx > ) -> bool {
@@ -278,8 +278,8 @@ impl Qualif for NeedsDrop {
278
278
const ANALYSIS_NAME : & ' static str = "flow_needs_drop" ;
279
279
const IS_CLEARED_ON_MOVE : bool = true ;
280
280
281
- fn in_qualif_set ( set : & QualifSet ) -> bool {
282
- set . needs_drop
281
+ fn in_qualifs ( qualifs : & ConstQualifs ) -> bool {
282
+ qualifs . needs_drop
283
283
}
284
284
285
285
fn in_any_value_of_ty ( cx : & ConstCx < ' _ , ' tcx > , ty : Ty < ' tcx > ) -> bool {
0 commit comments