@@ -699,6 +699,11 @@ impl<'a, 'tcx> CheckLoanCtxt<'a, 'tcx> {
699
699
lp : & Rc < LoanPath < ' tcx > > ) {
700
700
debug ! ( "check_if_path_is_moved(id={}, use_kind={:?}, lp={})" ,
701
701
id, use_kind, lp. repr( self . bccx. tcx) ) ;
702
+
703
+ // FIXME (22079): if you find yourself tempted to cut and paste
704
+ // the body below and then specializing the error reporting,
705
+ // consider refactoring this instead!
706
+
702
707
let base_lp = owned_ptr_base_path_rc ( lp) ;
703
708
self . move_data . each_move_of ( id, & base_lp, |the_move, moved_lp| {
704
709
self . bccx . report_use_of_moved_value (
@@ -751,6 +756,9 @@ impl<'a, 'tcx> CheckLoanCtxt<'a, 'tcx> {
751
756
// In the case where the owner implements drop, then
752
757
// the path must be initialized to prevent a case of
753
758
// partial reinitialization
759
+ //
760
+ // FIXME (22079): could refactor via hypothetical
761
+ // generalized check_if_path_is_moved
754
762
let loan_path = owned_ptr_base_path_rc ( lp_base) ;
755
763
self . move_data . each_move_of ( id, & loan_path, |_, _| {
756
764
self . bccx
0 commit comments