forked from rust-lang/regex
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RegexSet: fix literal optimization bug
When combining multiple regexes in a set where some are anchored and others aren't, it's possible to wind up in a situation where prefix scanning is used. This is bad, because it can lead to some of the anchored regexes matching where they shouldn't be allowed to match. As a result, we disable all literal optimizations for regex sets if *any* regex in the set is anchored. Fixes rust-lang#358
- Loading branch information
1 parent
68bc958
commit be9653c
Showing
2 changed files
with
12 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters