File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -258,6 +258,11 @@ impl Pre<()> {
258258 if !info. props ( ) [ 0 ] . look_set ( ) . is_empty ( ) {
259259 return None ;
260260 }
261+ // For a similar reason, we require that it has zero look-around
262+ // expressions.
263+ if info. props ( ) [ 0 ] . contains_lookaround_expr ( ) {
264+ return None ;
265+ }
261266 // Finally, currently, our prefilters are all oriented around
262267 // leftmost-first match semantics, so don't try to use them if the
263268 // caller asked for anything else.
Original file line number Diff line number Diff line change @@ -172,8 +172,9 @@ impl Extractor {
172172 use crate :: hir:: HirKind :: * ;
173173
174174 match * hir. kind ( ) {
175- Empty | Look ( _) => Seq :: singleton ( self :: Literal :: exact ( vec ! [ ] ) ) ,
176- LookAround ( _) => Seq :: infinite ( ) ,
175+ Empty | Look ( _) | LookAround ( _) => {
176+ Seq :: singleton ( self :: Literal :: exact ( vec ! [ ] ) )
177+ }
177178 Literal ( hir:: Literal ( ref bytes) ) => {
178179 let mut seq =
179180 Seq :: singleton ( self :: Literal :: exact ( bytes. to_vec ( ) ) ) ;
You can’t perform that action at this time.
0 commit comments