about summary refs log tree commit diff
path: root/src/libtest
AgeCommit message (Collapse)AuthorLines
2014-09-27auto merge of #17506 : sfackler/rust/cfg-attr, r=alexcrichtonbors-2/+1
cc #17490 Reopening of #16230
2014-09-25auto merge of #17378 : Gankro/rust/hashmap-entry, r=aturonbors-1/+5
Deprecates the `find_or_*` family of "internal mutation" methods on `HashMap` in favour of the "external mutation" Entry API as part of RFC 60. Part of #17320, but this still needs to be done on the rest of the maps. However they don't have any internal mutation methods defined, so they can be done without deprecating or breaking anything. Work on `BTree` is part of the complete rewrite in #17334. The implemented API deviates from the API described in the RFC in two key places: * `VacantEntry.set` yields a mutable reference to the inserted element to avoid code duplication where complex logic needs to be done *regardless* of whether the entry was vacant or not. * `OccupiedEntry.into_mut` was added so that it is possible to return a reference into the map beyond the lifetime of the Entry itself, providing functional parity to `VacantEntry.set`. This allows the full find_or_insert functionality to be implemented using this API. A PR will be submitted to the RFC to amend this. [breaking-change]
2014-09-24handling fallout from entry apiAlexis Beingessner-1/+5
2014-09-23Deprecate `#[ignore(cfg(...))]`Steven Fackler-2/+1
Replace `#[ignore(cfg(a, b))]` with `#[cfg_attr(all(a, b), ignore)]`
2014-09-22Update calls of deprecated functions in macros.Victor Berger-2/+2
Fallout of #17185.
2014-09-22auto merge of #17339 : treeman/rust/doc-things, r=alexcrichtonbors-3/+2
Also some cleanup to conform to documentation style.
2014-09-21Fix fallout from Vec stabilizationAlex Crichton-3/+3
2014-09-17doc: Cleanup.Jonas Hietala-3/+2
Remove ~~~ for code block specification. Use /// Over /** */ for doc blocks.
2014-09-16Fallout from renamingAaron Turon-8/+8
2014-09-13librustc: Forbid inherent implementations that aren't adjacent to thePatrick Walton-0/+1
type they provide an implementation for. This breaks code like: mod foo { struct Foo { ... } } impl foo::Foo { ... } Change this code to: mod foo { struct Foo { ... } impl Foo { ... } } Additionally, if you used the I/O path extension methods `stat`, `lstat`, `exists`, `is_file`, or `is_dir`, note that these methods have been moved to the the `std::io::fs::PathExtensions` trait. This breaks code like: fn is_it_there() -> bool { Path::new("/foo/bar/baz").exists() } Change this code to: use std::io::fs::PathExtensions; fn is_it_there() -> bool { Path::new("/foo/bar/baz").exists() } Closes #17059. RFC #155. [breaking-change]
2014-08-31Have std::io::TempDir::new and new_in return IoResultSimon Sapin-1/+1
This allows using `try!()` [breaking-change] Fixes #16875
2014-08-27Implement generalized object and type parameter bounds (Fixes #16462)Niko Matsakis-3/+3
2014-08-19serialize: add json bounds checks, support for u64s, and testsErick Tryzelaar-2/+2
2014-08-19serialize: add json::{Integer,Floating} to parse large integers properlyErick Tryzelaar-2/+2
[breaking-change]
2014-07-31alloc, arena, test, url, uuid: Elide lifetimes.OGINO Masanori-1/+1
Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
2014-07-21Get rid of few warnings in testsPiotr Jawniak-1/+0
2014-07-17deprecate Vec::getNick Cameron-2/+2
2014-07-15Fix errorsAdolfo Ochagavía-1/+0
2014-07-15Deprecate `str::from_utf8_lossy`Adolfo Ochagavía-3/+2
Use `String::from_utf8_lossy` 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-09Register new snapshotsAlex Crichton-3/+1
Closes #15544
2014-07-08std: Rename the `ToStr` trait to `ToString`, and `to_str` to `to_string`.Richo Healey-6/+6
[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-2/+2
Conflicts: src/libstd/lib.rs
2014-06-30Fix issues in libtestAdolfo Ochagavía-1/+1
2014-06-28librustc: Match trait self types exactly.Patrick Walton-1/+1
This can break code that looked like: impl Foo for Box<Any> { fn f(&self) { ... } } let x: Box<Any + Send> = ...; x.f(); Change such code to: impl Foo for Box<Any> { fn f(&self) { ... } } let x: Box<Any> = ...; x.f(); That is, upcast before calling methods. This is a conservative solution to #5781. A more proper treatment (see the xfail'd `trait-contravariant-self.rs`) would take variance into account. This change fixes the soundness hole. Some library changes had to be made to make this work. In particular, `Box<Any>` is no longer showable, and only `Box<Any+Send>` is showable. Eventually, this restriction can be lifted; for now, it does not prove too onerous, because `Any` is only used for propagating the result of task failure. This patch also adds a test for the variance inference work in #12828, which accidentally landed as part of DST. Closes #5781. [breaking-change]
2014-06-27Update to 0.11.0 0.11.0Alex Crichton-2/+2
2014-06-26Remove unnecessary to_string callsPiotr Jawniak-2/+2
This commit removes superfluous to_string calls from various places
2014-06-24librustc: Remove the fallback to `int` from typechecking.Niko Matsakis-12/+12
This breaks a fair amount of code. The typical patterns are: * `for _ in range(0, 10)`: change to `for _ in range(0u, 10)`; * `println!("{}", 3)`: change to `println!("{}", 3i)`; * `[1, 2, 3].len()`: change to `[1i, 2, 3].len()`. RFC #30. Closes #6023. [breaking-change]
2014-06-19auto merge of #15014 : brson/rust/all-crates-experimental, r=cmrbors-0/+1
This creates a stability baseline for all crates that we distribute that are not `std`. In general, all library code must start as experimental and progress in stages to become stable.
2014-06-18Fallout from TaskBuilder changesAaron Turon-5/+4
This commit brings code downstream of libstd up to date with the new TaskBuilder API.
2014-06-17Mark all crates except std as experimentalBrian Anderson-0/+1
2014-06-15Register new snapshotsAlex Crichton-8/+8
2014-06-14getopts: format failure messages with `Show`.Huon Wilson-1/+1
This obsoletes the old `to_err_msg` method. Replace println!("Error: {}", failure.to_err_msg()) let string = failure.to_err_msg(); with println!("Error: {}", failure) let string = failure.to_str(); [breaking-change]
2014-06-13auto merge of #14831 : alexcrichton/rust/format-intl, r=brsonbors-1/+1
* 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-1/+1
* 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-12/+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-09Add a --color flag to test binariesSteven Fackler-4/+31
It uses the same behavior as rustc's.
2014-06-06auto merge of #14667 : aochagavia/rust/pr2, r=huonwbors-2/+2
2014-06-06Change to_str().to_string() to just to_str()Adolfo Ochagavía-2/+2
2014-06-05Fallout from the libcollections movementAlex Crichton-5/+4
2014-06-01std: Drop Total from Total{Eq,Ord}Alex Crichton-3/+3
This completes the last stage of the renaming of the comparison hierarchy of traits. This change renames TotalEq to Eq and TotalOrd to Ord. In the future the new Eq/Ord will be filled out with their appropriate methods, but for now this change is purely a renaming change. [breaking-change]
2014-05-31libtest: Only colorize output if stdout is a ttyBen Noordhuis-1/+3
Fixes #14570.
2014-05-30std: Rename {Eq,Ord} to Partial{Eq,Ord}Alex Crichton-8/+8
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-28std: Remove format_strbuf!()Alex Crichton-7/+5
This was only ever a transitionary macro.
2014-05-27std: Rename strbuf operations to stringRicho Healey-63/+63
[breaking-change]
2014-05-27std: Remove String's to_ownedRicho Healey-2/+2
2014-05-26std: Remove String::from_owned_str as it's redundantRicho Healey-1/+1
[breaking-change]
2014-05-24core: rename strbuf::StrBuf to string::StringRicho Healey-17/+17
[breaking-change]