-
Notifications
You must be signed in to change notification settings - Fork 450
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
regex 1.0 #471
Merged
Merged
regex 1.0 #471
Conversation
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 also clarifies our policy on increasing the minimum Rust version required. In particular, we reserve the right to increase the minimum Rust version in minor version releases of regexes, but never in patch releases. We will default to a reasonably conservative interpretation of this policy, and not bump the minimum required Rust version lightly. If this policy turns out to be too aggressive, then we may alter it in the future to state that the minimum Rust version is fixed for all of regex 1.y.z, and can only be bumped on major regex version releases. See rust-lang#457
This commit disables octal syntax by default, which will permit us to produce useful error messages if a user tried to invoke a backreference. This commit adds a new `octal` method to RegexBuilder and RegexSetBuilder which permits callers to re-enable octal syntax. See rust-lang#457
This commit removes our explicit implementations of encode_utf8 and replaces them with uses of `char::encode_utf8`, which was added to the standard library in Rust 1.15.
The issue with the ASCII version of \B is that it can match between code units of UTF-8, which means it can cause match indices reported to be on invalid UTF-8 boundaries. Therefore, similar to things like `(?-u:\xFF)`, we ban negated ASCII word boundaries from Unicode regular expressions. Normal ASCII word boundaries remain accessible from Unicode regular expressions. See rust-lang#457
Make sure we can run tests for regex-syntax on Rust 1.20.0.
This removes a public `From` impl that automatically converts errors from the regex-syntax crate to a regex::Error. This actually causes regex-syntax to be a public dependency of regex, which was an oversight. We now remove it, which completely breaks any source code coupling between regex and regex-syntax. See rust-lang#457
This feature is no longer used, instead we rely on runtime CPU feature detection. We kept the feature around as a no-op for backwards compatibility, but no longer need to support it for regex 1.0.
This commit adds a new 'use_std' feature and enables it by default. This permits us to one day add support for building regex without 'use_std' (but with 'alloc', probably) by avoiding the introduction of incompatibilities. Namely, this setup ensures that all of today's uses of '--no-default-features' won't compile without also adding the 'use_std' feature. Closes rust-lang#457
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR collects a series of changes that should let us release regex 1.0. For the most part, these changes consist of the things listed in #457, along with miscellaneous cleanups like converting uses of
try!
to?
.We declare that the minimum supported version of Rust for regex 1.0 will be Rust 1.20.0 (regex 0.2 requires Rust 1.12 or newer).
Closes #457