@@ -39,7 +39,7 @@ type QualifResults<'mir, 'tcx, Q> =
3939#[ derive( Default ) ]
4040pub struct Qualifs < ' mir , ' tcx > {
4141 has_mut_interior : Option < QualifResults < ' mir , ' tcx , HasMutInterior > > ,
42- needs_drop : Option < QualifResults < ' mir , ' tcx , NeedsNonConstDrop > > ,
42+ needs_non_const_drop : Option < QualifResults < ' mir , ' tcx , NeedsNonConstDrop > > ,
4343 indirectly_mutable : Option < IndirectlyMutableResults < ' mir , ' tcx > > ,
4444}
4545
@@ -70,10 +70,10 @@ impl Qualifs<'mir, 'tcx> {
7070 indirectly_mutable. get ( ) . contains ( local)
7171 }
7272
73- /// Returns `true` if `local` is `NeedsDrop ` at the given `Location`.
73+ /// Returns `true` if `local` is `NeedsNonConstDrop ` at the given `Location`.
7474 ///
7575 /// Only updates the cursor if absolutely necessary
76- pub fn needs_drop (
76+ pub fn needs_non_const_drop (
7777 & mut self ,
7878 ccx : & ' mir ConstCx < ' mir , ' tcx > ,
7979 local : Local ,
@@ -84,7 +84,7 @@ impl Qualifs<'mir, 'tcx> {
8484 return false ;
8585 }
8686
87- let needs_drop = self . needs_drop . get_or_insert_with ( || {
87+ let needs_non_const_drop = self . needs_non_const_drop . get_or_insert_with ( || {
8888 let ConstCx { tcx, body, .. } = * ccx;
8989
9090 FlowSensitiveAnalysis :: new ( NeedsNonConstDrop , ccx)
@@ -93,8 +93,8 @@ impl Qualifs<'mir, 'tcx> {
9393 . into_results_cursor ( & body)
9494 } ) ;
9595
96- needs_drop . seek_before_primary_effect ( location) ;
97- needs_drop . get ( ) . contains ( local) || self . indirectly_mutable ( ccx, local, location)
96+ needs_non_const_drop . seek_before_primary_effect ( location) ;
97+ needs_non_const_drop . get ( ) . contains ( local) || self . indirectly_mutable ( ccx, local, location)
9898 }
9999
100100 /// Returns `true` if `local` is `HasMutInterior` at the given `Location`.
@@ -172,7 +172,7 @@ impl Qualifs<'mir, 'tcx> {
172172 } ;
173173
174174 ConstQualifs {
175- needs_drop : self . needs_drop ( ccx, RETURN_PLACE , return_loc) ,
175+ needs_non_const_drop : self . needs_non_const_drop ( ccx, RETURN_PLACE , return_loc) ,
176176 has_mut_interior : self . has_mut_interior ( ccx, RETURN_PLACE , return_loc) ,
177177 custom_eq,
178178 error_occured,
@@ -999,7 +999,7 @@ impl Visitor<'tcx> for Checker<'mir, 'tcx> {
999999 }
10001000
10011001 // Forbid all `Drop` terminators unless the place being dropped is a local with no
1002- // projections that cannot be `NeedsDrop `.
1002+ // projections that cannot be `NeedsNonConstDrop `.
10031003 TerminatorKind :: Drop { place : dropped_place, .. }
10041004 | TerminatorKind :: DropAndReplace { place : dropped_place, .. } => {
10051005 // If we are checking live drops after drop-elaboration, don't emit duplicate
@@ -1019,15 +1019,15 @@ impl Visitor<'tcx> for Checker<'mir, 'tcx> {
10191019 return ;
10201020 }
10211021
1022- let needs_drop = if let Some ( local) = dropped_place. as_local ( ) {
1022+ let needs_non_const_drop = if let Some ( local) = dropped_place. as_local ( ) {
10231023 // Use the span where the local was declared as the span of the drop error.
10241024 err_span = self . body . local_decls [ local] . source_info . span ;
1025- self . qualifs . needs_drop ( self . ccx , local, location)
1025+ self . qualifs . needs_non_const_drop ( self . ccx , local, location)
10261026 } else {
10271027 true
10281028 } ;
10291029
1030- if needs_drop {
1030+ if needs_non_const_drop {
10311031 self . check_op_spanned (
10321032 ops:: LiveDrop { dropped_at : Some ( terminator. source_info . span ) } ,
10331033 err_span,
0 commit comments