@@ -331,9 +331,9 @@ pub struct ArmData {
331331 bindings_map: BindingsMap
332332}
333333
334- pub struct Match {
334+ pub struct Match<'self> {
335335 pats: ~[@ast::pat],
336- data: @ArmData/& self
336+ data: @ArmData<' self>
337337}
338338
339339pub fn match_to_str(bcx: block, m: &Match) -> ~str {
@@ -359,9 +359,11 @@ pub fn has_nested_bindings(m: &[@Match], col: uint) -> bool {
359359 return false;
360360}
361361
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>] {
365367 debug!(" expand_nested_bindings( bcx=%s, m=%s, col=%u, val=%?) ",
366368 bcx.to_str(),
367369 matches_to_str(bcx, m),
@@ -402,9 +404,13 @@ pub fn assert_is_binding_or_wild(bcx: block, p: @ast::pat) {
402404 }
403405}
404406
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>] {
408414 debug!(" enter_match( bcx=%s, m=%s, col=%u, val=%?) ",
409415 bcx.to_str(),
410416 matches_to_str(bcx, m),
@@ -445,9 +451,12 @@ pub fn enter_match(bcx: block, dm: DefMap, m: &[@Match/&r],
445451 return result;
446452}
447453
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>] {
451460 debug!(" enter_default( bcx=%s, m=%s, col=%u, val=%?) ",
452461 bcx.to_str(),
453462 matches_to_str(bcx, m),
@@ -488,9 +497,13 @@ pub fn enter_default(bcx: block, dm: DefMap, m: &[@Match/&r],
488497// <nmatsakis> so all patterns must either be records (resp. tuples) or
489498// wildcards
490499
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>] {
494507 debug!(" enter_opt( bcx=%s, m=%s, col=%u, val=%?) ",
495508 bcx.to_str(),
496509 matches_to_str(bcx, m),
@@ -599,11 +612,11 @@ pub fn enter_opt(bcx: block, m: &[@Match/&r], opt: &Opt, col: uint,
599612
600613pub fn enter_rec_or_struct(bcx: block,
601614 dm: DefMap,
602- m: &[@Match/&r ],
615+ m: &[@Match<'r> ],
603616 col: uint,
604617 fields: &[ast::ident],
605618 val: ValueRef)
606- -> ~[@Match/&r ] {
619+ -> ~[@Match<'r> ] {
607620 debug!(" enter_rec_or_struct( bcx=%s, m=%s, col=%u, val=%?) ",
608621 bcx.to_str(),
609622 matches_to_str(bcx, m),
@@ -632,9 +645,13 @@ pub fn enter_rec_or_struct(bcx: block,
632645 }
633646}
634647
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>] {
638655 debug!(" enter_tup( bcx=%s, m=%s, col=%u, val=%?) ",
639656 bcx.to_str(),
640657 matches_to_str(bcx, m),
@@ -656,13 +673,13 @@ pub fn enter_tup(bcx: block, dm: DefMap, m: &[@Match/&r],
656673 }
657674}
658675
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> ] {
666683 debug!(" enter_tuple_struct( bcx=%s, m=%s, col=%u, val=%?) ",
667684 bcx.to_str(),
668685 matches_to_str(bcx, m),
@@ -682,12 +699,12 @@ pub fn enter_tuple_struct(bcx: block,
682699 }
683700}
684701
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> ] {
691708 debug!(" enter_box( bcx=%s, m=%s, col=%u, val=%?) ",
692709 bcx.to_str(),
693710 matches_to_str(bcx, m),
@@ -709,12 +726,12 @@ pub fn enter_box(bcx: block,
709726 }
710727}
711728
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> ] {
718735 debug!(" enter_uniq( bcx=%s, m=%s, col=%u, val=%?) ",
719736 bcx.to_str(),
720737 matches_to_str(bcx, m),
@@ -736,12 +753,12 @@ pub fn enter_uniq(bcx: block,
736753 }
737754}
738755
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> ] {
745762 debug!(" enter_region( bcx=%s, m=%s, col=%u, val=%?) ",
746763 bcx.to_str(),
747764 matches_to_str(bcx, m),
0 commit comments