Skip to content

Commit fee500d

Browse files
author
Jorge Aparicio
committed
libregex: fix fallout
1 parent 5e9ca5b commit fee500d

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/libregex/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,7 @@
370370

371371
#![allow(unknown_features)]
372372
#![feature(macro_rules, phase, slicing_syntax, globs)]
373+
#![feature(unboxed_closures)]
373374
#![deny(missing_docs)]
374375

375376
#[cfg(test)]

src/libregex/parse.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -838,8 +838,9 @@ impl<'a> Parser<'a> {
838838
// Otherwise, an error will be returned.
839839
// Generally, `allow_start` is only true when you're *not* expecting an
840840
// opening parenthesis.
841-
fn pos_last(&self, allow_start: bool, pred: |&BuildAst| -> bool)
842-
-> Result<uint, Error> {
841+
fn pos_last<P>(&self, allow_start: bool, pred: P) -> Result<uint, Error> where
842+
P: FnMut(&BuildAst) -> bool,
843+
{
843844
let from = match self.stack.iter().rev().position(pred) {
844845
Some(i) => i,
845846
None => {

0 commit comments

Comments
 (0)