]> git.lizzy.rs Git - rust.git/commitdiff
auto merge of #14634 : BurntSushi/rust/fix-13843, r=alexcrichton
authorbors <bors@rust-lang.org>
Wed, 4 Jun 2014 05:01:43 +0000 (22:01 -0700)
committerbors <bors@rust-lang.org>
Wed, 4 Jun 2014 05:01:43 +0000 (22:01 -0700)
An empty regex is a valid regex that always matches. This behavior
is consistent with at least Go and Python.

A couple regression tests are included.

I'd just assume that an empty regex is an invalid regex and that an error should be returned (I can't think of any reason to use an empty regex?), but it's probably better to be consistent with other regex libraries.


Trivial merge