about summary refs log tree commit diff
path: root/src/libregex
AgeCommit message (Collapse)AuthorLines
2014-09-21Fix fallout from Vec stabilizationAlex Crichton-6/+6
2014-09-19Add enum variants to the type namespaceNick Cameron-27/+27
Change to resolve and update compiler and libs for uses. [breaking-change] Enum variants are now in both the value and type namespaces. This means that if you have a variant with the same name as a type in scope in a module, you will get a name clash and thus an error. The solution is to either rename the type or the variant.
2014-09-16Fallout from renamingAaron Turon-7/+7
2014-09-04auto merge of #16982 : jbcrail/rust/comment-and-string-corrections, ↵bors-5/+5
r=alexcrichton I corrected spelling and capitalization errors in comments and strings.
2014-09-03Fix spelling errors and capitalization.Joseph Crail-5/+5
2014-09-01Updated to new extern crate syntax.wickerwaka-1/+1
Added warning for old deprecated syntax
2014-08-30Unify non-snake-case lints and non-uppercase statics lintsP1start-1/+1
This unifies the `non_snake_case_functions` and `uppercase_variables` lints into one lint, `non_snake_case`. It also now checks for non-snake-case modules. This also extends the non-camel-case types lint to check type parameters, and merges the `non_uppercase_pattern_statics` lint into the `non_uppercase_statics` lint. Because the `uppercase_variables` lint is now part of the `non_snake_case` lint, all non-snake-case variables that start with lowercase characters (such as `fooBar`) will now trigger the `non_snake_case` lint. New code should be updated to use the new `non_snake_case` lint instead of the previous `non_snake_case_functions` and `uppercase_variables` lints. All use of the `non_uppercase_pattern_statics` should be replaced with the `non_uppercase_statics` lint. Any code that previously contained non-snake-case module or variable names should be updated to use snake case names or disable the `non_snake_case` lint. Any code with non-camel-case type parameters should be changed to use camel case or disable the `non_camel_case_types` lint. [breaking-change]
2014-08-18regex: Enable test on Windowsklutzy-2/+1
Fixes #13725
2014-08-13core: Change the argument order on splitn and rsplitn for strs.Brian Anderson-5/+5
This makes it consistent with the same functions for slices, and allows the search closure to be specified last. [breaking-change]
2014-08-13core: Add binary_search and binary_search_elem methods to slices.Brian Anderson-4/+5
These are like the existing bsearch methods but if the search fails, it returns the next insertion point. The new `binary_search` returns a `BinarySearchResult` that is either `Found` or `NotFound`. For convenience, the `found` and `not_found` methods convert to `Option`, ala `Result`. Deprecate bsearch and bsearch_elem.
2014-08-13std: Rename various slice traits for consistencyBrian Anderson-1/+1
ImmutableVector -> ImmutableSlice ImmutableEqVector -> ImmutableEqSlice ImmutableOrdVector -> ImmutableOrdSlice MutableVector -> MutableSlice MutableVectorAllocating -> MutableSliceAllocating MutableCloneableVector -> MutableCloneableSlice MutableOrdVector -> MutableOrdSlice These are all in the prelude so most code will not break. [breaking-change]
2014-08-06Use a byte literal in libregexnham-1/+1
2014-07-23collections: Deprecate shift/unshiftBrian Anderson-1/+1
Use insert/remove instead.
2014-07-22auto merge of #15867 : cmr/rust/rewrite-lexer4, r=alexcrichtonbors-0/+3
2014-07-21Add a ton of ignore-lexer-testCorey Richardson-0/+1
2014-07-21ignore-lexer-test to broken files and remove some tray hyphensCorey Richardson-0/+2
I blame @ChrisMorgan for the hyphens.
2014-07-17deprecate Vec::getNick Cameron-17/+17
2014-07-15Fix errorsAdolfo Ochagavía-2/+0
2014-07-15Deprecate `str::from_chars`Adolfo Ochagavía-2/+2
Use `String::from_chars` instead [breaking-change]
2014-07-15Deprecate `str::from_utf8_owned`Adolfo Ochagavía-1/+1
Use `String::from_utf8` instead [breaking-change]
2014-07-11Update doc URLs for version bumpBrian Anderson-1/+1
2014-07-10auto merge of #15556 : alexcrichton/rust/snapshots, r=brsonbors-2/+0
Closes #15544
2014-07-09Register new snapshotsAlex Crichton-2/+0
Closes #15544
2014-07-09fix test failureskwantam-2/+2
- unicode tests live in coretest crate - libcollections str tests need UnicodeChar trait. - libregex perlw tests were checking a char in the Alphabetic category, \x2161. Confirmed perl 5.18 considers this a \w character. Changed to \x2961, which is not \w as the test expects.
2014-07-07Add libunicode; move unicode functions from corekwantam-5544/+11
- created new crate, libunicode, below libstd - split Char trait into Char (libcore) and UnicodeChar (libunicode) - Unicode-aware functions now live in libunicode - is_alphabetic, is_XID_start, is_XID_continue, is_lowercase, is_uppercase, is_whitespace, is_alphanumeric, is_control, is_digit, to_uppercase, to_lowercase - added width method in UnicodeChar trait - determines printed width of character in columns, or None if it is a non-NULL control character - takes a boolean argument indicating whether the present context is CJK or not (characters with 'A'mbiguous widths are double-wide in CJK contexts, single-wide otherwise) - split StrSlice into StrSlice (libcore) and UnicodeStrSlice (libunicode) - functionality formerly in StrSlice that relied upon Unicode functionality from Char is now in UnicodeStrSlice - words, is_whitespace, is_alphanumeric, trim, trim_left, trim_right - also moved Words type alias into libunicode because words method is in UnicodeStrSlice - unified Unicode tables from libcollections, libcore, and libregex into libunicode - updated unicode.py in src/etc to generate aforementioned tables - generated new tables based on latest Unicode data - added UnicodeChar and UnicodeStrSlice traits to prelude - libunicode is now the collection point for the std::char module, combining the libunicode functionality with the Char functionality from libcore - thus, moved doc comment for char from core::char to unicode::char - libcollections remains the collection point for std::str The Unicode-aware functions that previously lived in the Char and StrSlice traits are no longer available to programs that only use libcore. To regain use of these methods, include the libunicode crate and use the UnicodeChar and/or UnicodeStrSlice traits: extern crate unicode; use unicode::UnicodeChar; use unicode::UnicodeStrSlice; use unicode::Words; // if you want to use the words() method NOTE: this does *not* impact programs that use libstd, since UnicodeChar and UnicodeStrSlice have been added to the prelude. closes #15224 [breaking-change]
2014-07-05Add #[crate_name] attributes as necessaryAlex Crichton-1/+3
2014-07-02Merge remote-tracking branch 'origin/master' into 0.11.0-releaseAlex Crichton-1/+1
Conflicts: src/libstd/lib.rs
2014-06-29librustc: Remove the fallback to `int` for integers and `f64` forPatrick Walton-1/+1
floating point numbers for real. This will break code that looks like: let mut x = 0; while ... { x += 1; } println!("{}", x); Change that code to: let mut x = 0i; while ... { x += 1; } println!("{}", x); Closes #15201. [breaking-change]
2014-06-27Update to 0.11.0 0.11.0Alex Crichton-2/+2
2014-06-15Register new snapshotsAlex Crichton-12/+0
2014-06-13Fix all violations of stronger guarantees for mutable borrowsCameron Zwarich-4/+5
Fix all violations in the Rust source tree of the stronger guarantee of a unique access path for mutable borrows as described in #12624.
2014-06-13auto merge of #14831 : alexcrichton/rust/format-intl, r=brsonbors-0/+12
* The select/plural methods from format strings are removed * The # character no longer needs to be escaped * The \-based escapes have been removed * '{{' is now an escape for '{' * '}}' is now an escape for '}' Closes #14810 [breaking-change]
2014-06-11std: Remove i18n/l10n from format!Alex Crichton-0/+12
* The select/plural methods from format strings are removed * The # character no longer needs to be escaped * The \-based escapes have been removed * '{{' is now an escape for '{' * '}}' is now an escape for '}' Closes #14810 [breaking-change]
2014-06-11rustc: Remove ~[T] from the languageAlex Crichton-1/+1
The following features have been removed * box [a, b, c] * ~[a, b, c] * box [a, ..N] * ~[a, ..N] * ~[T] (as a type) * deprecated_owned_vector lint All users of ~[T] should move to using Vec<T> instead.
2014-06-10Fix more misspelled comments and strings.Joseph Crail-2/+2
2014-06-09Use phase(plugin) in other cratesKeegan McAllister-20/+20
2014-06-08core: Rename `container` mod to `collections`. Closes #12543Brian Anderson-1/+1
Also renames the `Container` trait to `Collection`. [breaking-change]
2014-06-06rustdoc: Submit examples to play.rust-lang.orgAlex Crichton-1/+2
This grows a new option inside of rustdoc to add the ability to submit examples to an external website. If the `--markdown-playground-url` command line option or crate doc attribute `html_playground_url` is present, then examples will have a button on hover to submit the code to the playground specified. This commit enables submission of example code to play.rust-lang.org. The code submitted is that which is tested by rustdoc, not necessarily the exact code shown in the example. Closes #14654
2014-06-05Fallout from the libcollections movementAlex Crichton-2/+1
2014-06-03auto merge of #14635 : BurntSushi/rust/regex-doco-touchups, r=alexcrichtonbors-19/+24
2014-06-03Some minor documentation touchups for libregex. Fixes #13800.Andrew Gallant-19/+24
2014-06-03Fixes #13843.Andrew Gallant-0/+17
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.
2014-05-30std: Rename {Eq,Ord} to Partial{Eq,Ord}Alex Crichton-1/+1
This is part of the ongoing renaming of the equality traits. See #12517 for more details. All code using Eq/Ord will temporarily need to move to Partial{Eq,Ord} or the Total{Eq,Ord} traits. The Total traits will soon be renamed to {Eq,Ord}. cc #12517 [breaking-change]
2014-05-30lib{std,core,debug,rustuv,collections,native,regex}: Fix snake_case errors.Kevin Butler-0/+1
A number of functions/methods have been moved or renamed to align better with rust standard conventions. std::reflect::MovePtrAdaptor => MovePtrAdaptor::new debug::reflect::MovePtrAdaptor => MovePtrAdaptor::new std::repr::ReprVisitor => ReprVisitor::new debug::repr::ReprVisitor => ReprVisitor::new rustuv::homing::HomingIO.go_to_IO_home => go_to_io_home [breaking-change]
2014-05-29auto merge of #14510 : kballard/rust/rename_strallocating_into_owned, ↵bors-2/+2
r=alexcrichton We already have into_string(), but it was implemented in terms of into_owned(). Flip it around and deprecate into_owned(). Remove a few spurious calls to .into_owned() that existed in libregex and librustdoc.
2014-05-29std: Recreate a `rand` moduleAlex Crichton-4/+5
This commit shuffles around some of the `rand` code, along with some reorganization. The new state of the world is as follows: * The librand crate now only depends on libcore. This interface is experimental. * The standard library has a new module, `std::rand`. This interface will eventually become stable. Unfortunately, this entailed more of a breaking change than just shuffling some names around. The following breaking changes were made to the rand library: * Rng::gen_vec() was removed. This has been replaced with Rng::gen_iter() which will return an infinite stream of random values. Previous behavior can be regained with `rng.gen_iter().take(n).collect()` * Rng::gen_ascii_str() was removed. This has been replaced with Rng::gen_ascii_chars() which will return an infinite stream of random ascii characters. Similarly to gen_iter(), previous behavior can be emulated with `rng.gen_ascii_chars().take(n).collect()` * {IsaacRng, Isaac64Rng, XorShiftRng}::new() have all been removed. These all relied on being able to use an OSRng for seeding, but this is no longer available in librand (where these types are defined). To retain the same functionality, these types now implement the `Rand` trait so they can be generated with a random seed from another random number generator. This allows the stdlib to use an OSRng to create seeded instances of these RNGs. * Rand implementations for `Box<T>` and `@T` were removed. These seemed to be pretty rare in the codebase, and it allows for librand to not depend on liballoc. Additionally, other pointer types like Rc<T> and Arc<T> were not supported. If this is undesirable, librand can depend on liballoc and regain these implementations. * The WeightedChoice structure is no longer built with a `Vec<Weighted<T>>`, but rather a `&mut [Weighted<T>]`. This means that the WeightedChoice structure now has a lifetime associated with it. * The `sample` method on `Rng` has been moved to a top-level function in the `rand` module due to its dependence on `Vec`. cc #13851 [breaking-change]
2014-05-28Replace StrAllocating.into_owned() with .into_string()Kevin Ballard-2/+2
We already have into_string(), but it was implemented in terms of into_owned(). Flip it around and deprecate into_owned(). Remove a few spurious calls to .into_owned() that existed in libregex and librustdoc.
2014-05-28std: Remove format_strbuf!()Alex Crichton-4/+3
This was only ever a transitionary macro.
2014-05-27std: Rename strbuf operations to stringRicho Healey-10/+10
[breaking-change]
2014-05-25Change regex! macro to expand to a constexpr, allowing to put it in a staticMarvin Löbel-35/+113