Skip to content

Commit c7b033b

Browse files
committed
---
yaml --- r: 183485 b: refs/heads/beta c: 6cc3b00 h: refs/heads/master i: 183483: 958b5b4 v: v3
1 parent b223ceb commit c7b033b

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ refs/heads/automation-fail: 1bf06495443584539b958873e04cc2f864ab10e4
3131
refs/heads/issue-18208-method-dispatch-3-quick-reject: 2009f85b9f99dedcec4404418eda9ddba90258a2
3232
refs/heads/batch: b7fd822592a4fb577552d93010c4a4e14f314346
3333
refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
34-
refs/heads/beta: 32d0dbd49a372b9d2e000587497de6ffca9e1cca
34+
refs/heads/beta: 6cc3b00d3f7b1e7512d85830bf62f2acc461237d
3535
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
3636
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
3737
refs/heads/tmp: eb836bf767aa1d8d4cba488a9091cde3c0ab4b2f

branches/beta/src/librustc_borrowck/borrowck/check_loans.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -699,6 +699,11 @@ impl<'a, 'tcx> CheckLoanCtxt<'a, 'tcx> {
699699
lp: &Rc<LoanPath<'tcx>>) {
700700
debug!("check_if_path_is_moved(id={}, use_kind={:?}, lp={})",
701701
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+
702707
let base_lp = owned_ptr_base_path_rc(lp);
703708
self.move_data.each_move_of(id, &base_lp, |the_move, moved_lp| {
704709
self.bccx.report_use_of_moved_value(
@@ -751,6 +756,9 @@ impl<'a, 'tcx> CheckLoanCtxt<'a, 'tcx> {
751756
// In the case where the owner implements drop, then
752757
// the path must be initialized to prevent a case of
753758
// partial reinitialization
759+
//
760+
// FIXME (22079): could refactor via hypothetical
761+
// generalized check_if_path_is_moved
754762
let loan_path = owned_ptr_base_path_rc(lp_base);
755763
self.move_data.each_move_of(id, &loan_path, |_, _| {
756764
self.bccx

0 commit comments

Comments
 (0)