@@ -42,7 +42,7 @@ use dataflow::DataflowResultsConsumer;
42
42
use dataflow:: FlowAtLocation ;
43
43
use dataflow:: MoveDataParamEnv ;
44
44
use dataflow:: { do_dataflow, DebugFormatted } ;
45
- use dataflow:: { EverInitializedPlaces , MovingOutStatements } ;
45
+ use dataflow:: { EverInitializedPlaces } ; // , MovingOutStatements};
46
46
use dataflow:: { MaybeInitializedPlaces , MaybeUninitializedPlaces } ;
47
47
use util:: borrowck_errors:: { BorrowckErrors , Origin } ;
48
48
@@ -185,15 +185,15 @@ fn do_mir_borrowck<'a, 'gcx, 'tcx>(
185
185
MaybeUninitializedPlaces :: new ( tcx, mir, & mdpe) ,
186
186
|bd, i| DebugFormatted :: new ( & bd. move_data ( ) . move_paths [ i] ) ,
187
187
) ) ;
188
- let flow_move_outs = FlowAtLocation :: new ( do_dataflow (
188
+ /* let flow_move_outs = FlowAtLocation::new(do_dataflow(
189
189
tcx,
190
190
mir,
191
191
id,
192
192
&attributes,
193
193
&dead_unwinds,
194
194
MovingOutStatements::new(tcx, mir, &mdpe),
195
195
|bd, i| DebugFormatted::new(&bd.move_data().moves[i]),
196
- ) ) ;
196
+ ));*/
197
197
let flow_ever_inits = FlowAtLocation :: new ( do_dataflow (
198
198
tcx,
199
199
mir,
@@ -267,7 +267,7 @@ fn do_mir_borrowck<'a, 'gcx, 'tcx>(
267
267
let mut state = Flows :: new (
268
268
flow_borrows,
269
269
flow_uninits,
270
- flow_move_outs,
270
+ // flow_move_outs,
271
271
flow_ever_inits,
272
272
polonius_output,
273
273
) ;
@@ -407,6 +407,7 @@ pub struct MirBorrowckCtxt<'cx, 'gcx: 'tcx, 'tcx: 'cx> {
407
407
reservation_error_reported : FxHashSet < Place < ' tcx > > ,
408
408
/// This field keeps track of errors reported in the checking of moved variables,
409
409
/// so that we don't report seemingly duplicate errors.
410
+ #[ allow( unused) ]
410
411
moved_error_reported : FxHashSet < Place < ' tcx > > ,
411
412
/// Errors to be reported buffer
412
413
errors_buffer : Vec < Diagnostic > ,
@@ -805,6 +806,7 @@ struct AccessErrorsReported {
805
806
}
806
807
807
808
#[ derive( Copy , Clone ) ]
809
+ #[ allow( unused) ]
808
810
enum InitializationRequiringAction {
809
811
Update ,
810
812
Borrow ,
@@ -818,6 +820,7 @@ struct RootPlace<'d, 'tcx: 'd> {
818
820
}
819
821
820
822
impl InitializationRequiringAction {
823
+ #[ allow( unused) ]
821
824
fn as_noun ( self ) -> & ' static str {
822
825
match self {
823
826
InitializationRequiringAction :: Update => "update" ,
@@ -827,6 +830,7 @@ impl InitializationRequiringAction {
827
830
}
828
831
}
829
832
833
+ #[ allow( unused) ]
830
834
fn as_verb_in_past_tense ( self ) -> & ' static str {
831
835
match self {
832
836
InitializationRequiringAction :: Update => "updated" ,
@@ -1616,8 +1620,8 @@ impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx> {
1616
1620
1617
1621
fn check_if_full_path_is_moved (
1618
1622
& mut self ,
1619
- context : Context ,
1620
- desired_action : InitializationRequiringAction ,
1623
+ _context : Context ,
1624
+ _desired_action : InitializationRequiringAction ,
1621
1625
place_span : ( & Place < ' tcx > , Span ) ,
1622
1626
flow_state : & Flows < ' cx , ' gcx , ' tcx > ,
1623
1627
) {
@@ -1626,7 +1630,7 @@ impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx> {
1626
1630
let place = self . base_path ( place_span. 0 ) ;
1627
1631
1628
1632
let maybe_uninits = & flow_state. uninits ;
1629
- let curr_move_outs = & flow_state. move_outs ;
1633
+ // let curr_move_outs = &flow_state.move_outs;
1630
1634
1631
1635
// Bad scenarios:
1632
1636
//
@@ -1667,13 +1671,13 @@ impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx> {
1667
1671
match self . move_path_closest_to ( place) {
1668
1672
Ok ( mpi) => {
1669
1673
if maybe_uninits. contains ( & mpi) {
1670
- self . report_use_of_moved_or_uninitialized (
1674
+ /* self.report_use_of_moved_or_uninitialized(
1671
1675
context,
1672
1676
desired_action,
1673
1677
place_span,
1674
1678
mpi,
1675
1679
curr_move_outs,
1676
- ) ;
1680
+ );*/
1677
1681
return ; // don't bother finding other problems.
1678
1682
}
1679
1683
}
@@ -1700,7 +1704,7 @@ impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx> {
1700
1704
let place = self . base_path ( place_span. 0 ) ;
1701
1705
1702
1706
let maybe_uninits = & flow_state. uninits ;
1703
- let curr_move_outs = & flow_state. move_outs ;
1707
+ // let curr_move_outs = &flow_state.move_outs;
1704
1708
1705
1709
// Bad scenarios:
1706
1710
//
@@ -1730,14 +1734,16 @@ impl<'cx, 'gcx, 'tcx> MirBorrowckCtxt<'cx, 'gcx, 'tcx> {
1730
1734
1731
1735
debug ! ( "check_if_path_or_subpath_is_moved place: {:?}" , place) ;
1732
1736
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
+ /*
1734
1739
self.report_use_of_moved_or_uninitialized(
1735
1740
context,
1736
1741
desired_action,
1737
1742
place_span,
1738
1743
child_mpi,
1739
1744
curr_move_outs,
1740
1745
);
1746
+ */
1741
1747
return ; // don't bother finding other problems.
1742
1748
}
1743
1749
}
0 commit comments