From: Jorge Aparicio Date: Wed, 31 Dec 2014 03:51:00 +0000 (-0500) Subject: rustc_trans: replace `EnterPatterns` alias with an unboxed closure X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=10bbf69488b4863378e4acd9d55bde36b4a20909;p=rust.git rustc_trans: replace `EnterPatterns` alias with an unboxed closure --- 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()),