Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #369 - rust-lang:ag-fix-353, r=BurntSushi
compiler: fix RegexSet bug When compiling a RegexSet, it was possible for the jump locations to become incorrect if the last regex in the set had a starting location that didn't correspond to the beginning of its program. This can happen in simple cases like when your set consists of the regexes `a` and `β`. In particular, the program for `β` is: 0: Bytes(\xB2) (goto 2) 1: Bytes(\xCE) (goto 0) 2: MATCH Where the entry point is `1` instead of `0`. To fix this, we compile a set of regexes similarly to how we compile `a|β`, where we handle the holes produced by sub-expressions correctly. Fixes #353
- Loading branch information