diff options
| author | Jorge Aparicio <japaricious@gmail.com> | 2014-12-03 19:46:51 -0500 |
|---|---|---|
| committer | Jorge Aparicio <japaricious@gmail.com> | 2014-12-13 17:03:45 -0500 |
| commit | fee500d3124544ee6d9c59d9d9b15927172458d8 (patch) | |
| tree | e4e982f2c6e550e9fae1fbdd288c0be25bd4c05f /src/libregex | |
| parent | 5e9ca5b25530ab58f9d0b09662884928b054f271 (diff) | |
| download | rust-fee500d3124544ee6d9c59d9d9b15927172458d8.tar.gz rust-fee500d3124544ee6d9c59d9d9b15927172458d8.zip | |
libregex: fix fallout
Diffstat (limited to 'src/libregex')
| -rw-r--r-- | src/libregex/lib.rs | 1 | ||||
| -rw-r--r-- | src/libregex/parse.rs | 5 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/libregex/lib.rs b/src/libregex/lib.rs index b35c3879783..05f853a851e 100644 --- a/src/libregex/lib.rs +++ b/src/libregex/lib.rs @@ -370,6 +370,7 @@ #![allow(unknown_features)] #![feature(macro_rules, phase, slicing_syntax, globs)] +#![feature(unboxed_closures)] #![deny(missing_docs)] #[cfg(test)] diff --git a/src/libregex/parse.rs b/src/libregex/parse.rs index 55e533aadee..f7ea83a8a38 100644 --- a/src/libregex/parse.rs +++ b/src/libregex/parse.rs @@ -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 => { |
