We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1c5aac2 commit 95d0763Copy full SHA for 95d0763
src/libregex/parse.rs
@@ -888,8 +888,9 @@ impl<'a> Parser<'a> {
888
// build_from combines all AST elements starting at 'from' in the
889
// parser's stack using 'mk' to combine them. If any such element is not an
890
// AST then it is popped off the stack and ignored.
891
- fn build_from(&mut self, from: uint, mk: |Ast, Ast| -> Ast)
892
- -> Result<Ast, Error> {
+ fn build_from<F>(&mut self, from: uint, mut mk: F) -> Result<Ast, Error> where
+ F: FnMut(Ast, Ast) -> Ast,
893
+ {
894
if from >= self.stack.len() {
895
return self.err("Empty group or alternate not allowed.")
896
}
0 commit comments