From 10bbf69488b4863378e4acd9d55bde36b4a20909 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Tue, 30 Dec 2014 22:51:00 -0500 Subject: [PATCH] rustc_trans: replace `EnterPatterns` alias with an unboxed closure --- src/librustc_trans/trans/_match.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/librustc_trans/trans/_match.rs b/src/librustc_trans/trans/_match.rs index 6e6b1c34061..fc68d1d3258 100644 --- a/src/librustc_trans/trans/_match.rs +++ b/src/librustc_trans/trans/_match.rs @@ -410,15 +410,15 @@ fn expand_nested_bindings<'a, 'p, 'blk, 'tcx>(bcx: Block<'blk, 'tcx>, }).collect() } -type EnterPatterns<'a, 'p> = |&[&'p ast::Pat]|: 'a -> Option>; - -fn enter_match<'a, 'b, 'p, 'blk, 'tcx>(bcx: Block<'blk, 'tcx>, - dm: &DefMap, - m: &[Match<'a, 'p, 'blk, 'tcx>], - col: uint, - val: ValueRef, - e: EnterPatterns<'b, 'p>) - -> Vec> { +fn enter_match<'a, 'b, 'p, 'blk, 'tcx, F>(bcx: Block<'blk, 'tcx>, + dm: &DefMap, + m: &[Match<'a, 'p, 'blk, 'tcx>], + col: uint, + val: ValueRef, + mut e: F) + -> Vec> where + F: FnMut(&[&'p ast::Pat]) -> Option>, +{ debug!("enter_match(bcx={}, m={}, col={}, val={})", bcx.to_str(), m.repr(bcx.tcx()),