libregex: fix fallout
This commit is contained in:
parent
5e9ca5b255
commit
fee500d312
@ -370,6 +370,7 @@
|
||||
|
||||
#![allow(unknown_features)]
|
||||
#![feature(macro_rules, phase, slicing_syntax, globs)]
|
||||
#![feature(unboxed_closures)]
|
||||
#![deny(missing_docs)]
|
||||
|
||||
#[cfg(test)]
|
||||
|
@ -838,8 +838,9 @@ impl<'a> Parser<'a> {
|
||||
// Otherwise, an error will be returned.
|
||||
// Generally, `allow_start` is only true when you're *not* expecting an
|
||||
// opening parenthesis.
|
||||
fn pos_last(&self, allow_start: bool, pred: |&BuildAst| -> bool)
|
||||
-> Result<uint, Error> {
|
||||
fn pos_last<P>(&self, allow_start: bool, pred: P) -> Result<uint, Error> where
|
||||
P: FnMut(&BuildAst) -> bool,
|
||||
{
|
||||
let from = match self.stack.iter().rev().position(pred) {
|
||||
Some(i) => i,
|
||||
None => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user