Skip to content

Commit 70cd9a0

Browse files
Explain use of empty look-set
1 parent 6fee5f6 commit 70cd9a0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

regex-syntax/src/hir/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2589,6 +2589,8 @@ impl Properties {
25892589
literal: false,
25902590
alternation_literal: false,
25912591
contains_lookaround_expr: true,
2592+
// We do not want look-around subexpressions to influence matching
2593+
// of the main expression when they contain anchors, so we clear the set.
25922594
look_set_prefix: LookSet::empty(),
25932595
look_set_suffix: LookSet::empty(),
25942596
..*sub_p.0.clone()

0 commit comments

Comments
 (0)