File tree Expand file tree Collapse file tree 2 files changed +13
-5
lines changed
trunk/src/librustc_borrowck/borrowck Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: 24b49228f0dbd5a4b59a5297532f4b9cb4dfdc6a
2
+ refs/heads/master: bcc2120c2134cd4359d160e55ebbc3c3bcb72f16
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: c89417130f042c58adc60012e7cddc4ef70b70b9
5
5
refs/heads/try: 5204084bd2e46af7cc6e0147430e44dd0d657bbb
Original file line number Diff line number Diff line change @@ -521,15 +521,17 @@ impl<'tcx> MoveData<'tcx> {
521
521
return true ;
522
522
}
523
523
524
- // FIXME(#19596) unbox `f`
525
- fn each_extending_path ( & self , index : MovePathIndex , f: |MovePathIndex | -> bool) -> bool {
526
- if !f ( index) {
524
+ // FIXME(#19596) This is a workaround, but there should be better way to do this
525
+ fn each_extending_path_ < F > ( & self , index : MovePathIndex , f : & mut F ) -> bool where
526
+ F : FnMut ( MovePathIndex ) -> bool ,
527
+ {
528
+ if !( * f) ( index) {
527
529
return false ;
528
530
}
529
531
530
532
let mut p = self . path_first_child ( index) ;
531
533
while p != InvalidMovePathIndex {
532
- if !self . each_extending_path ( p, |x| f ( x ) ) {
534
+ if !self . each_extending_path_ ( p, f ) {
533
535
return false ;
534
536
}
535
537
p = self . path_next_sibling ( p) ;
@@ -538,6 +540,12 @@ impl<'tcx> MoveData<'tcx> {
538
540
return true ;
539
541
}
540
542
543
+ fn each_extending_path < F > ( & self , index : MovePathIndex , mut f : F ) -> bool where
544
+ F : FnMut ( MovePathIndex ) -> bool ,
545
+ {
546
+ self . each_extending_path_ ( index, & mut f)
547
+ }
548
+
541
549
fn each_applicable_move < F > ( & self , index0 : MovePathIndex , mut f : F ) -> bool where
542
550
F : FnMut ( MoveIndex ) -> bool ,
543
551
{
You can’t perform that action at this time.
0 commit comments