summary refs log tree commit diff
path: root/src/libregex
AgeCommit message (Collapse)AuthorLines
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
2014-05-24core: rename strbuf::StrBuf to string::StringRicho Healey-26/+26
[breaking-change]
2014-05-22auto merge of #14348 : alexcrichton/rust/doc.rust-lang.org, r=huonwbors-1/+1
2014-05-22libcore: Remove all uses of `~str` from `libcore`.Patrick Walton-15/+17
[breaking-change]
2014-05-22libstd: Remove `~str` from all `libstd` modules except `fmt` and `str`.Patrick Walton-30/+60
2014-05-21Change static.rust-lang.org to doc.rust-lang.orgAlex Crichton-1/+1
The new documentation site has shorter urls, gzip'd content, and index.html redirecting functionality.
2014-05-17syntax: Tighten search paths for inner modulesAlex Crichton-0/+0
This is an implementation of RFC 16. A module can now only be loaded if the module declaring `mod name;` "owns" the current directory. A module is considered as owning its directory if it meets one of the following criteria: * It is the top-level crate file * It is a `mod.rs` file * It was loaded via `#[path]` * It was loaded via `include!` * The module was declared via an inline `mod foo { ... }` statement For example, this directory structure is now invalid // lib.rs mod foo; // foo.rs mod bar; // bar.rs; fn bar() {} With this change `foo.rs` must be renamed to `foo/mod.rs`, and `bar.rs` must be renamed to `foo/bar.rs`. This makes it clear that `bar` is a submodule of `foo`, and can only be accessed through `foo`. RFC: 0016-module-file-system-hierarchy Closes #14180 [breaking-change]
2014-05-15Updates with core::fmt changesAlex Crichton-2/+2
1. Wherever the `buf` field of a `Formatter` was used, the `Formatter` is used instead. 2. The usage of `write_fmt` is minimized as much as possible, the `write!` macro is preferred wherever possible. 3. Usage of `fmt::write` is minimized, favoring the `write!` macro instead.
2014-05-14librand: Remove all uses of `~str` from `librand`Patrick Walton-1/+1
2014-05-14libregex: Remove all uses of `~str` from `libregex`Patrick Walton-39/+44
2014-05-12Add the patch number to version strings. Closes #13289Brian Anderson-1/+1
2014-05-06librustc: Remove `~EXPR`, `~TYPE`, and `~PAT` from the language, exceptPatrick Walton-10/+10
for `~str`/`~[]`. Note that `~self` still remains, since I forgot to add support for `Box<self>` before the snapshot. How to update your code: * Instead of `~EXPR`, you should write `box EXPR`. * Instead of `~TYPE`, you should write `Box<Type>`. * Instead of `~PATTERN`, you should write `box PATTERN`. [breaking-change]
2014-04-30librustc: Remove `~"string"` and `&"string"` from the languagePatrick Walton-2/+4
2014-04-30regex: General style tweaks.Huon Wilson-23/+10
For loops are nicer than manual whiles, etc.
2014-04-30regex: remove the use of ~[] & some unnecessary ~'s.Huon Wilson-87/+86
The AST doesn't need ~s everywhere, so we can save allocations this way & the enum isn't particularly large (~4 words) nor are regexes long (normally), so the space saved in the `Cat` vector is unlikely to be very much.
2014-04-25Tests for dynamic regexes will now run during 'check-stage2'.Andrew Gallant-5/+15
Before, tests for dynamic regexes ran during stage1 and tests for native regexes ran during stage2. But the buildbots don't test stage1, so now both dynamic and native tests are run during stage2. Closes #13740.
2014-04-25Ignore regex tests (regular, cfail and benchmark) on Windows (for now).Andrew Gallant-1/+2
2014-04-25Add a regex crate to the Rust distribution.Andrew Gallant-0/+10000
Also adds a regex_macros crate, which provides natively compiled regular expressions with a syntax extension. Closes #3591. RFC: 0007-regexps