libregex: fix fallout

This commit is contained in:
Jorge Aparicio 2014-12-03 19:46:51 -05:00
parent 5e9ca5b255
commit fee500d312
2 changed files with 4 additions and 2 deletions

View File

@ -370,6 +370,7 @@
#![allow(unknown_features)]
#![feature(macro_rules, phase, slicing_syntax, globs)]
#![feature(unboxed_closures)]
#![deny(missing_docs)]
#[cfg(test)]

View File

@ -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 => {