rustc_trans: replace EnterPatterns
alias with an unboxed closure
This commit is contained in:
parent
c8cf3a307b
commit
10bbf69488
1 changed files with 9 additions and 9 deletions
|
@ -410,15 +410,15 @@ fn expand_nested_bindings<'a, 'p, 'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
|
||||||
}).collect()
|
}).collect()
|
||||||
}
|
}
|
||||||
|
|
||||||
type EnterPatterns<'a, 'p> = |&[&'p ast::Pat]|: 'a -> Option<Vec<&'p ast::Pat>>;
|
fn enter_match<'a, 'b, 'p, 'blk, 'tcx, F>(bcx: Block<'blk, 'tcx>,
|
||||||
|
dm: &DefMap,
|
||||||
fn enter_match<'a, 'b, 'p, 'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
|
m: &[Match<'a, 'p, 'blk, 'tcx>],
|
||||||
dm: &DefMap,
|
col: uint,
|
||||||
m: &[Match<'a, 'p, 'blk, 'tcx>],
|
val: ValueRef,
|
||||||
col: uint,
|
mut e: F)
|
||||||
val: ValueRef,
|
-> Vec<Match<'a, 'p, 'blk, 'tcx>> where
|
||||||
e: EnterPatterns<'b, 'p>)
|
F: FnMut(&[&'p ast::Pat]) -> Option<Vec<&'p ast::Pat>>,
|
||||||
-> Vec<Match<'a, 'p, 'blk, 'tcx>> {
|
{
|
||||||
debug!("enter_match(bcx={}, m={}, col={}, val={})",
|
debug!("enter_match(bcx={}, m={}, col={}, val={})",
|
||||||
bcx.to_str(),
|
bcx.to_str(),
|
||||||
m.repr(bcx.tcx()),
|
m.repr(bcx.tcx()),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue