diff options
| author | Jorge Aparicio <japaricious@gmail.com> | 2014-12-30 22:51:00 -0500 |
|---|---|---|
| committer | Jorge Aparicio <japaricious@gmail.com> | 2014-12-31 22:50:27 -0500 |
| commit | 10bbf69488b4863378e4acd9d55bde36b4a20909 (patch) | |
| tree | 677b67f3551322a38b0529b72f82c287df9bc1f8 | |
| parent | c8cf3a307b94349cd4948a860d62730945e8d805 (diff) | |
| download | rust-10bbf69488b4863378e4acd9d55bde36b4a20909.tar.gz rust-10bbf69488b4863378e4acd9d55bde36b4a20909.zip | |
rustc_trans: replace `EnterPatterns` alias with an unboxed closure
| -rw-r--r-- | src/librustc_trans/trans/_match.rs | 18 |
1 files 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<Vec<&'p ast::Pat>>; - -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<Match<'a, 'p, 'blk, 'tcx>> { +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<Match<'a, 'p, 'blk, 'tcx>> where + F: FnMut(&[&'p ast::Pat]) -> Option<Vec<&'p ast::Pat>>, +{ debug!("enter_match(bcx={}, m={}, col={}, val={})", bcx.to_str(), m.repr(bcx.tcx()), |
