@@ -331,9 +331,9 @@ pub struct ArmData {
331
331
bindings_map: BindingsMap
332
332
}
333
333
334
- pub struct Match {
334
+ pub struct Match<'self> {
335
335
pats: ~[@ast::pat],
336
- data: @ArmData/& self
336
+ data: @ArmData<' self>
337
337
}
338
338
339
339
pub fn match_to_str(bcx: block, m: &Match) -> ~str {
@@ -359,9 +359,11 @@ pub fn has_nested_bindings(m: &[@Match], col: uint) -> bool {
359
359
return false;
360
360
}
361
361
362
- pub fn expand_nested_bindings(bcx: block, m: &[@Match/&r],
363
- col: uint, val: ValueRef)
364
- -> ~[@Match/&r] {
362
+ pub fn expand_nested_bindings<'r>(bcx: block,
363
+ m: &[@Match<'r>],
364
+ col: uint,
365
+ val: ValueRef)
366
+ -> ~[@Match<'r>] {
365
367
debug!(" expand_nested_bindings( bcx=%s, m=%s, col=%u, val=%?) ",
366
368
bcx.to_str(),
367
369
matches_to_str(bcx, m),
@@ -402,9 +404,13 @@ pub fn assert_is_binding_or_wild(bcx: block, p: @ast::pat) {
402
404
}
403
405
}
404
406
405
- pub fn enter_match(bcx: block, dm: DefMap, m: &[@Match/&r],
406
- col: uint, val: ValueRef, e: enter_pat)
407
- -> ~[@Match/&r] {
407
+ pub fn enter_match<'r>(bcx: block,
408
+ dm: DefMap,
409
+ m: &[@Match<'r>],
410
+ col: uint,
411
+ val: ValueRef,
412
+ e: enter_pat)
413
+ -> ~[@Match<'r>] {
408
414
debug!(" enter_match( bcx=%s, m=%s, col=%u, val=%?) ",
409
415
bcx.to_str(),
410
416
matches_to_str(bcx, m),
@@ -445,9 +451,12 @@ pub fn enter_match(bcx: block, dm: DefMap, m: &[@Match/&r],
445
451
return result;
446
452
}
447
453
448
- pub fn enter_default(bcx: block, dm: DefMap, m: &[@Match/&r],
449
- col: uint, val: ValueRef)
450
- -> ~[@Match/&r] {
454
+ pub fn enter_default<'r>(bcx: block,
455
+ dm: DefMap,
456
+ m: &[@Match<'r>],
457
+ col: uint,
458
+ val: ValueRef)
459
+ -> ~[@Match<'r>] {
451
460
debug!(" enter_default( bcx=%s, m=%s, col=%u, val=%?) ",
452
461
bcx.to_str(),
453
462
matches_to_str(bcx, m),
@@ -488,9 +497,13 @@ pub fn enter_default(bcx: block, dm: DefMap, m: &[@Match/&r],
488
497
// <nmatsakis> so all patterns must either be records (resp. tuples) or
489
498
// wildcards
490
499
491
- pub fn enter_opt(bcx: block, m: &[@Match/&r], opt: &Opt, col: uint,
492
- variant_size: uint, val: ValueRef)
493
- -> ~[@Match/&r] {
500
+ pub fn enter_opt<'r>(bcx: block,
501
+ m: &[@Match<'r>],
502
+ opt: &Opt,
503
+ col: uint,
504
+ variant_size: uint,
505
+ val: ValueRef)
506
+ -> ~[@Match<'r>] {
494
507
debug!(" enter_opt( bcx=%s, m=%s, col=%u, val=%?) ",
495
508
bcx.to_str(),
496
509
matches_to_str(bcx, m),
@@ -599,11 +612,11 @@ pub fn enter_opt(bcx: block, m: &[@Match/&r], opt: &Opt, col: uint,
599
612
600
613
pub fn enter_rec_or_struct(bcx: block,
601
614
dm: DefMap,
602
- m: &[@Match/&r ],
615
+ m: &[@Match<'r> ],
603
616
col: uint,
604
617
fields: &[ast::ident],
605
618
val: ValueRef)
606
- -> ~[@Match/&r ] {
619
+ -> ~[@Match<'r> ] {
607
620
debug!(" enter_rec_or_struct( bcx=%s, m=%s, col=%u, val=%?) ",
608
621
bcx.to_str(),
609
622
matches_to_str(bcx, m),
@@ -632,9 +645,13 @@ pub fn enter_rec_or_struct(bcx: block,
632
645
}
633
646
}
634
647
635
- pub fn enter_tup(bcx: block, dm: DefMap, m: &[@Match/&r],
636
- col: uint, val: ValueRef, n_elts: uint)
637
- -> ~[@Match/&r] {
648
+ pub fn enter_tup<'r>(bcx: block,
649
+ dm: DefMap,
650
+ m: &[@Match<'r>],
651
+ col: uint,
652
+ val: ValueRef,
653
+ n_elts: uint)
654
+ -> ~[@Match<'r>] {
638
655
debug!(" enter_tup( bcx=%s, m=%s, col=%u, val=%?) ",
639
656
bcx.to_str(),
640
657
matches_to_str(bcx, m),
@@ -656,13 +673,13 @@ pub fn enter_tup(bcx: block, dm: DefMap, m: &[@Match/&r],
656
673
}
657
674
}
658
675
659
- pub fn enter_tuple_struct(bcx: block,
660
- dm: DefMap,
661
- m: &[@Match/&r ],
662
- col: uint,
663
- val: ValueRef,
664
- n_elts: uint)
665
- -> ~[@Match/&r ] {
676
+ pub fn enter_tuple_struct<'r> (bcx: block,
677
+ dm: DefMap,
678
+ m: &[@Match<'r> ],
679
+ col: uint,
680
+ val: ValueRef,
681
+ n_elts: uint)
682
+ -> ~[@Match<'r> ] {
666
683
debug!(" enter_tuple_struct( bcx=%s, m=%s, col=%u, val=%?) ",
667
684
bcx.to_str(),
668
685
matches_to_str(bcx, m),
@@ -682,12 +699,12 @@ pub fn enter_tuple_struct(bcx: block,
682
699
}
683
700
}
684
701
685
- pub fn enter_box(bcx: block,
686
- dm: DefMap,
687
- m: &[@Match/&r ],
688
- col: uint,
689
- val: ValueRef)
690
- -> ~[@Match/&r ] {
702
+ pub fn enter_box<'r> (bcx: block,
703
+ dm: DefMap,
704
+ m: &[@Match<'r> ],
705
+ col: uint,
706
+ val: ValueRef)
707
+ -> ~[@Match<'r> ] {
691
708
debug!(" enter_box( bcx=%s, m=%s, col=%u, val=%?) ",
692
709
bcx.to_str(),
693
710
matches_to_str(bcx, m),
@@ -709,12 +726,12 @@ pub fn enter_box(bcx: block,
709
726
}
710
727
}
711
728
712
- pub fn enter_uniq(bcx: block,
713
- dm: DefMap,
714
- m: &[@Match/&r ],
715
- col: uint,
716
- val: ValueRef)
717
- -> ~[@Match/&r ] {
729
+ pub fn enter_uniq<'r> (bcx: block,
730
+ dm: DefMap,
731
+ m: &[@Match<'r> ],
732
+ col: uint,
733
+ val: ValueRef)
734
+ -> ~[@Match<'r> ] {
718
735
debug!(" enter_uniq( bcx=%s, m=%s, col=%u, val=%?) ",
719
736
bcx.to_str(),
720
737
matches_to_str(bcx, m),
@@ -736,12 +753,12 @@ pub fn enter_uniq(bcx: block,
736
753
}
737
754
}
738
755
739
- pub fn enter_region(bcx: block,
740
- dm: DefMap,
741
- m: &[@Match/&r ],
742
- col: uint,
743
- val: ValueRef)
744
- -> ~[@Match/&r ] {
756
+ pub fn enter_region<'r> (bcx: block,
757
+ dm: DefMap,
758
+ m: &[@Match<'r> ],
759
+ col: uint,
760
+ val: ValueRef)
761
+ -> ~[@Match<'r> ] {
745
762
debug!(" enter_region( bcx=%s, m=%s, col=%u, val=%?) ",
746
763
bcx.to_str(),
747
764
matches_to_str(bcx, m),
0 commit comments