File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
src/librustc_mir/transform/check_consts Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,9 @@ impl QualifSet {
25
25
pub trait Qualif {
26
26
const IDX : usize ;
27
27
28
+ /// Whether this `Qualif` is cleared when a local is moved from.
29
+ const IS_CLEARED_ON_MOVE : bool = false ;
30
+
28
31
/// Return the qualification that is (conservatively) correct for any value
29
32
/// of the type, or `None` if the qualification is not value/type-based.
30
33
fn in_any_value_of_ty ( _cx : & ConstCx < ' _ , ' tcx > , _ty : Ty < ' tcx > ) -> Option < bool > {
@@ -256,6 +259,7 @@ pub struct NeedsDrop;
256
259
257
260
impl Qualif for NeedsDrop {
258
261
const IDX : usize = 1 ;
262
+ const IS_CLEARED_ON_MOVE : bool = true ;
259
263
260
264
fn in_any_value_of_ty ( cx : & ConstCx < ' _ , ' tcx > , ty : Ty < ' tcx > ) -> Option < bool > {
261
265
Some ( ty. needs_drop ( cx. tcx , cx. param_env ) )
You can’t perform that action at this time.
0 commit comments