@@ -42,7 +42,7 @@ use dataflow::DataflowResultsConsumer;
4242use dataflow:: FlowAtLocation ;
4343use dataflow:: MoveDataParamEnv ;
4444use dataflow:: { do_dataflow, DebugFormatted } ;
45- use dataflow:: { EverInitializedPlaces , MovingOutStatements } ;
45+ use dataflow:: { EverInitializedPlaces } ; // , MovingOutStatements};
4646use dataflow:: { MaybeInitializedPlaces , MaybeUninitializedPlaces } ;
4747use util:: borrowck_errors:: { BorrowckErrors , Origin } ;
4848
@@ -185,15 +185,15 @@ fn do_mir_borrowck<'a, 'gcx, 'tcx>(
185185 MaybeUninitializedPlaces :: new ( tcx, mir, & mdpe) ,
186186 |bd, i| DebugFormatted :: new ( & bd. move_data ( ) . move_paths [ i] ) ,
187187 ) ) ;
188- let flow_move_outs = FlowAtLocation :: new ( do_dataflow (
188+ /* let flow_move_outs = FlowAtLocation::new(do_dataflow(
189189 tcx,
190190 mir,
191191 id,
192192 &attributes,
193193 &dead_unwinds,
194194 MovingOutStatements::new(tcx, mir, &mdpe),
195195 |bd, i| DebugFormatted::new(&bd.move_data().moves[i]),
196- ) ) ;
196+ ));*/
197197 let flow_ever_inits = FlowAtLocation :: new ( do_dataflow (
198198 tcx,
199199 mir,
@@ -267,7 +267,7 @@ fn do_mir_borrowck<'a, 'gcx, 'tcx>(
267267 let mut state = Flows :: new (
268268 flow_borrows,
269269 flow_uninits,
270- flow_move_outs,
270+ // flow_move_outs,
271271 flow_ever_inits,
272272 polonius_output,
273273 ) ;
@@ -407,6 +407,7 @@ pub struct MirBorrowckCtxt<'cx, 'gcx: 'tcx, 'tcx: 'cx> {
407407 reservation_error_reported : FxHashSet < Place < ' tcx > > ,
408408 /// This field keeps track of errors reported in the checking of moved variables,
409409 /// so that we don't report seemingly duplicate errors.
410+ #[ allow( unused) ]
410411 moved_error_reported : FxHashSet < Place < ' tcx > > ,
411412 /// Errors to be reported buffer
412413 errors_buffer : Vec < Diagnostic > ,
@@ -805,6 +806,7 @@ struct AccessErrorsReported {
805806}
806807
807808#[ derive( Copy , Clone ) ]
809+ #[ allow( unused) ]
808810enum InitializationRequiringAction {
809811 Update ,
810812 Borrow ,
@@ -818,6 +820,7 @@ struct RootPlace<'d, 'tcx: 'd> {
818820}
819821
820822impl InitializationRequiringAction {
823+ #[ allow( unused) ]
821824 fn as_noun ( self ) -> & ' static str {
822825 match self {
823826 InitializationRequiringAction :: Update => "update" ,
@@ -827,6 +830,7 @@ impl InitializationRequiringAction {
827830 }
828831 }
829832
833+ #[ allow( unused) ]
830834 fn as_verb_in_past_tense ( self ) -> & ' static str {
831835 match self {
832836 InitializationRequiringAction :: Update => "updated" ,
@@ -1616,8 +1620,8 @@ impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx> {
16161620
16171621 fn check_if_full_path_is_moved (
16181622 & mut self ,
1619- context : Context ,
1620- desired_action : InitializationRequiringAction ,
1623+ _context : Context ,
1624+ _desired_action : InitializationRequiringAction ,
16211625 place_span : ( & Place < ' tcx > , Span ) ,
16221626 flow_state : & Flows < ' cx , ' gcx , ' tcx > ,
16231627 ) {
@@ -1626,7 +1630,7 @@ impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx> {
16261630 let place = self . base_path ( place_span. 0 ) ;
16271631
16281632 let maybe_uninits = & flow_state. uninits ;
1629- let curr_move_outs = & flow_state. move_outs ;
1633+ // let curr_move_outs = &flow_state.move_outs;
16301634
16311635 // Bad scenarios:
16321636 //
@@ -1667,13 +1671,13 @@ impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx> {
16671671 match self . move_path_closest_to ( place) {
16681672 Ok ( mpi) => {
16691673 if maybe_uninits. contains ( & mpi) {
1670- self . report_use_of_moved_or_uninitialized (
1674+ /* self.report_use_of_moved_or_uninitialized(
16711675 context,
16721676 desired_action,
16731677 place_span,
16741678 mpi,
16751679 curr_move_outs,
1676- ) ;
1680+ );*/
16771681 return ; // don't bother finding other problems.
16781682 }
16791683 }
@@ -1700,7 +1704,7 @@ impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx> {
17001704 let place = self . base_path ( place_span. 0 ) ;
17011705
17021706 let maybe_uninits = & flow_state. uninits ;
1703- let curr_move_outs = & flow_state. move_outs ;
1707+ // let curr_move_outs = &flow_state.move_outs;
17041708
17051709 // Bad scenarios:
17061710 //
@@ -1730,14 +1734,16 @@ impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx> {
17301734
17311735 debug ! ( "check_if_path_or_subpath_is_moved place: {:?}" , place) ;
17321736 if let Some ( mpi) = self . move_path_for_place ( place) {
1733- if let Some ( child_mpi) = maybe_uninits. has_any_child_of ( mpi) {
1737+ if let Some ( _child_mpi) = maybe_uninits. has_any_child_of ( mpi) {
1738+ /*
17341739 self.report_use_of_moved_or_uninitialized(
17351740 context,
17361741 desired_action,
17371742 place_span,
17381743 child_mpi,
17391744 curr_move_outs,
17401745 );
1746+ */
17411747 return ; // don't bother finding other problems.
17421748 }
17431749 }
0 commit comments