about summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2014-10-20auto merge of #18070 : alexcrichton/rust/spring-cleaning, r=aturonbors-601/+29
This is a large spring-cleaning commit now that the 0.12.0 release has passed removing an amount of deprecated functionality. This removes a number of deprecated crates (all still available as cargo packages in the rust-lang organization) as well as a slew of deprecated functions. All `#[crate_id]` support has also been removed. I tried to avoid anything that was recently deprecated, but I may have missed something! The major pain points of this commit is the fact that rustc/syntax have `#[allow(deprecated)]`, but I've removed that annotation so moving forward they should be cleaned up as we go.
2014-10-20auto merge of #18174 : huonw/rust/fix-sqrt, r=alexcrichtonbors-0/+22
Closes #9987.
2014-10-20Handle negative numbers in `sqrt` properly.Huon Wilson-0/+22
Closes #9987.
2014-10-20auto merge of #18108 : mahkoh/rust/buffered_reader, r=alexcrichtonbors-2/+11
This optimizes `read` for the case in which the number of bytes requested is larger than the internal buffer. Note that the first comparison occurs again right afterwards and should thus be free. The second comparison occurs only in the cold branch.
2014-10-20Optimize BufferedReader::read for large buffers.Julian Orth-2/+11
This optimizes `read` for the case in which the number of bytes requested is larger than the internal buffer. Note that the first comparison occurs again right afterwards and should thus be free. The second comparison occurs only in the cold branch.
2014-10-19Remove a large amount of deprecated functionalityAlex Crichton-601/+29
Spring cleaning is here! In the Fall! This commit removes quite a large amount of deprecated functionality from the standard libraries. I tried to ensure that only old deprecated functionality was removed. This is removing lots and lots of deprecated features, so this is a breaking change. Please consult the deprecation messages of the deleted code to see how to migrate code forward if it still needs migration. [breaking-change]
2014-10-18auto merge of #18103 : pcwalton/rust/bitflags-inline, r=thestingerbors-0/+11
Servo really wants this. r? @nick29581
2014-10-17auto merge of #18093 : steveklabnik/rust/remove_gc_reference, r=alexcrichtonbors-7/+5
2014-10-17auto merge of #17998 : rapha/rust/master, r=alexcrichtonbors-15/+60
2014-10-16libstd: Inline more methods on bitflags.Patrick Walton-0/+11
Servo really wants this.
2014-10-16auto merge of #17947 : lukemetz/rust/master, r=aturonbors-14/+34
AsciiStr::to_lower is now AsciiStr::to_lowercase and AsciiStr::to_upper is AsciiStr::to_uppercase to match Ascii trait. Part of issue #17790. This is my first pull request so let me know if anything is incorrect. Thanks! [breaking-changes]
2014-10-16don't refer to the nonexistant gcSteve Klabnik-7/+5
2014-10-16libstd: Remove all uses of {:?}.Luqman Aden-26/+26
2014-10-16Remove libdebug and update tests.Luqman Aden-10/+2
2014-10-16impl Buffer for ChanReaderRaphael Speyer-15/+60
2014-10-15Renamed AsciiStr::to_lower and AsciiStr::to_upper=-22/+42
Now AsciiStr::to_lowercase and AsciiStr::to_uppercase to match Ascii trait. [breaking-change]
2014-10-13Clean up rustc warnings.NODA, Kai-74/+109
compiletest: compact "linux" "macos" etc.as "unix". liballoc: remove a superfluous "use". libcollections: remove invocations of deprecated methods in favor of their suggested replacements and use "_" for a loop counter. libcoretest: remove invocations of deprecated methods; also add "allow(deprecated)" for testing a deprecated method itself. libglob: use "cfg_attr". libgraphviz: add a test for one of data constructors. libgreen: remove a superfluous "use". libnum: "allow(type_overflow)" for type cast into u8 in a test code. librustc: names of static variables should be in upper case. libserialize: v[i] instead of get(). libstd/ascii: to_lowercase() instead of to_lower(). libstd/bitflags: modify AnotherSetOfFlags to use i8 as its backend. It will serve better for testing various aspects of bitflags!. libstd/collections: "allow(deprecated)" for testing a deprecated method itself. libstd/io: remove invocations of deprecated methods and superfluous "use". Also add #[test] where it was missing. libstd/num: introduce a helper function to effectively remove invocations of a deprecated method. libstd/path and rand: remove invocations of deprecated methods and superfluous "use". libstd/task and libsync/comm: "allow(deprecated)" for testing a deprecated method itself. libsync/deque: remove superfluous "unsafe". libsync/mutex and once: names of static variables should be in upper case. libterm: introduce a helper function to effectively remove invocations of a deprecated method. We still see a few warnings about using obsoleted native::task::spawn() in the test modules for libsync. I'm not sure how I should replace them with std::task::TaksBuilder and native::task::NativeTaskBuilder (dependency to libstd?) Signed-off-by: NODA, Kai <nodakai@gmail.com>
2014-10-10Register new snapshotsAlex Crichton-29/+25
Also convert a number of `static mut` to just a plain old `static` and remove some unsafe blocks.
2014-10-10improve the performance of the vec![] macroDaniel Micay-12/+11
Closes #17865
2014-10-10implement Box<[T]> <-> Vec<T> conversionsDaniel Micay-1/+1
2014-10-10auto merge of #17853 : alexcrichton/rust/issue-17718, r=pcwaltonbors-138/+138
This change is an implementation of [RFC 69][rfc] which adds a third kind of global to the language, `const`. This global is most similar to what the old `static` was, and if you're unsure about what to use then you should use a `const`. The semantics of these three kinds of globals are: * A `const` does not represent a memory location, but only a value. Constants are translated as rvalues, which means that their values are directly inlined at usage location (similar to a #define in C/C++). Constant values are, well, constant, and can not be modified. Any "modification" is actually a modification to a local value on the stack rather than the actual constant itself. Almost all values are allowed inside constants, whether they have interior mutability or not. There are a few minor restrictions listed in the RFC, but they should in general not come up too often. * A `static` now always represents a memory location (unconditionally). Any references to the same `static` are actually a reference to the same memory location. Only values whose types ascribe to `Sync` are allowed in a `static`. This restriction is in place because many threads may access a `static` concurrently. Lifting this restriction (and allowing unsafe access) is a future extension not implemented at this time. * A `static mut` continues to always represent a memory location. All references to a `static mut` continue to be `unsafe`. This is a large breaking change, and many programs will need to be updated accordingly. A summary of the breaking changes is: * Statics may no longer be used in patterns. Statics now always represent a memory location, which can sometimes be modified. To fix code, repurpose the matched-on-`static` to a `const`. static FOO: uint = 4; match n { FOO => { /* ... */ } _ => { /* ... */ } } change this code to: const FOO: uint = 4; match n { FOO => { /* ... */ } _ => { /* ... */ } } * Statics may no longer refer to other statics by value. Due to statics being able to change at runtime, allowing them to reference one another could possibly lead to confusing semantics. If you are in this situation, use a constant initializer instead. Note, however, that statics may reference other statics by address, however. * Statics may no longer be used in constant expressions, such as array lengths. This is due to the same restrictions as listed above. Use a `const` instead. [breaking-change] Closes #17718 [rfc]: https://github.com/rust-lang/rfcs/pull/246
2014-10-09Test fixes and rebase conflictsAlex Crichton-8/+8
2014-10-09Use the same html_root_url for all docsBrian Anderson-1/+1
2014-10-09Revert "Update html_root_url for 0.12.0 release"Brian Anderson-1/+1
This reverts commit 2288f332301b9e22db2890df256322650a7f3445.
2014-10-09std: Convert statics to constantsAlex Crichton-130/+130
This commit repurposes most statics as constants in the standard library itself, with the exception of TLS keys which precisely have their own memory location as an implementation detail. This commit also rewrites the bitflags syntax to use `const` instead of `static`. All invocations will need to replace the word `static` with `const` when declaring flags. Due to the modification of the `bitflags!` syntax, this is a: [breaking-change]
2014-10-09Merge tag '0.12.0'Brian Anderson-1/+1
0.12.0 release
2014-10-07Remove use of `final` and `override` (now reserved)John Gallagher-1/+1
2014-10-07Update html_root_url for 0.12.0 releaseBrian Anderson-1/+1
2014-10-07auto merge of #17802 : Gankro/rust/collection-docs-redux, r=aturonbors-3/+317
Adds a high-level discussion of "what collection should you use for what", as well as some general discussion of correct/efficient usage of the capacity, iterator, and entry APIs. Still building docs to confirm this renders right and the examples are good, but the content can be reviewed now.
2014-10-06library-level docs for collectionsAlexis Beingessner-3/+317
2014-10-07Rename slicing methodsNick Cameron-0/+1
2014-10-07Rename slice::SliceNick Cameron-13/+13
2014-10-07Put slicing syntax behind a feature gate.Nick Cameron-16/+20
[breaking-change] If you are using slicing syntax you will need to add #![feature(slicing_syntax)] to your crate.
2014-10-07Use slice syntax instead of slice_to, etc.Nick Cameron-71/+60
2014-10-06auto merge of #17814 : vhbit/rust/ios-build-fix, r=huonwbors-0/+1
2014-10-06Fixed iOS build (statics name lint)Valerii Hiora-0/+1
2014-10-06Remove the #[allow(non_uppercase_statics)] attr from bitflags!P1start-23/+18
2014-10-06Rename the file permission statics in std::io to be uppercaseP1start-60/+118
For example, this renames `GroupRWX` to `GROUP_RWX`, and deprecates the old name. Code using these statics should be updated accordingly.
2014-10-04Fix infinite recursion in Writer impl for &mut WriterBrian Koropoff-2/+2
Closes issue #17767
2014-10-03rollup merge of #17739 : eddyb/fix-process-testAlex Crichton-26/+0
2014-10-03rollup merge of #17387 : sneves/masterAlex Crichton-1/+1
2014-10-03Fix a race condition between remove_from_env and other io::process tests.Eduard Burtescu-26/+0
2014-10-03Set the `non_uppercase_statics` lint to warn by defaultP1start-4/+15
2014-10-02rollup merge of #17666 : eddyb/take-garbage-outAlex Crichton-161/+1
Conflicts: src/libcollections/lib.rs src/libcore/lib.rs src/librustdoc/lib.rs src/librustrt/lib.rs src/libserialize/lib.rs src/libstd/lib.rs src/test/run-pass/issue-8898.rs
2014-10-02rollup merge of #17686 : lucidd/fixAlex Crichton-2/+3
2014-10-02rollup merge of #17719 : alexcrichton/diagnoseAlex Crichton-1/+3
2014-10-02std: Help diagnose a flaky testAlex Crichton-1/+3
This test has recently been failing on the bots, and I'm not entirely sure why. I haven't been able to reproduce locally or on the bots, so I'm adding some messages to help diagnose the problem hopefully.
2014-10-02Revert "Use slice syntax instead of slice_to, etc."Aaron Turon-58/+69
This reverts commit 40b9f5ded50ac4ce8c9323921ec556ad611af6b7.
2014-10-02Revert "Put slicing syntax behind a feature gate."Aaron Turon-20/+16
This reverts commit 95cfc35607ccf5f02f02de56a35a9ef50fa23a82.
2014-10-02Revert "Review and rebasing changes"Aaron Turon-2/+2
This reverts commit 6e0611a48707a1f5d90aee32a02b2b15957ef25b.