Skip to content

Commit 10bbf69

Browse files
author
Jorge Aparicio
committed
rustc_trans: replace EnterPatterns alias with an unboxed closure
1 parent c8cf3a3 commit 10bbf69

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/librustc_trans/trans/_match.rs

+9-9
Original file line numberDiff line numberDiff line change
@@ -410,15 +410,15 @@ fn expand_nested_bindings<'a, 'p, 'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
410410
}).collect()
411411
}
412412

413-
type EnterPatterns<'a, 'p> = |&[&'p ast::Pat]|: 'a -> Option<Vec<&'p ast::Pat>>;
414-
415-
fn enter_match<'a, 'b, 'p, 'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
416-
dm: &DefMap,
417-
m: &[Match<'a, 'p, 'blk, 'tcx>],
418-
col: uint,
419-
val: ValueRef,
420-
e: EnterPatterns<'b, 'p>)
421-
-> Vec<Match<'a, 'p, 'blk, 'tcx>> {
413+
fn enter_match<'a, 'b, 'p, 'blk, 'tcx, F>(bcx: Block<'blk, 'tcx>,
414+
dm: &DefMap,
415+
m: &[Match<'a, 'p, 'blk, 'tcx>],
416+
col: uint,
417+
val: ValueRef,
418+
mut e: F)
419+
-> Vec<Match<'a, 'p, 'blk, 'tcx>> where
420+
F: FnMut(&[&'p ast::Pat]) -> Option<Vec<&'p ast::Pat>>,
421+
{
422422
debug!("enter_match(bcx={}, m={}, col={}, val={})",
423423
bcx.to_str(),
424424
m.repr(bcx.tcx()),

0 commit comments

Comments
 (0)