about summary refs log tree commit diff
path: root/src/libcoretest
AgeCommit message (Collapse)AuthorLines
2015-03-02Rollup merge of #22504 - GuillaumeGomez:audit-integer-libcore, r=ManishearthManish Goregaokar-33/+9
Part of #22240.
2015-03-01Remove int/uint from libstd/lib.rsGuillaume Gomez-33/+9
2015-03-01remove some compiler warningsTshepang Lekhonkhobe-5/+3
2015-03-01Make Int::pow() take exp as u32 instead usizeGuillaume Gomez-0/+11
2015-02-27Rollup merge of #22835 - tshepang:remove-some-warnings, r=jakub-Manish Goregaokar-3/+3
2015-02-27Rollup merge of #22817 - jmesmon:result-or-type, r=huonwManish Goregaokar-2/+2
Changes .or() so that it can return a Result with a different E type than the one it is called on. Essentially: fn or(self, res: Result<T, E>) -> Result<T, E> becomes fn or<F>(self, res: Result<T, F>) -> Result<T, F> This brings `or` in line with the existing `and` & `or_else` This is a [breaking-change] Due to some code needing additional type annotations.
2015-02-26remove some compiler warningsTshepang Lekhonkhobe-3/+3
2015-02-25Result::or : avoid over-specializing the typeCody P Schafer-2/+2
Changes .or() so that it can return a Result with a different E type than the one it is called on. Essentially: fn or(self, res: Result<T, E>) -> Result<T, E> becomes fn or<F>(self, res: Result<T, F>) -> Result<T, F> This brings `or` in line with the existing `and` and `or_else` member types. This is a [breaking-change] Due to some code needing additional type annotations.
2015-02-25Rollup merge of #22747 - krdln:fix-parsing-minus, r=alexcrichtonManish Goregaokar-0/+5
Makes Rust less amusing by fixing [#22745](https://github.com/rust-lang/rust/issues/22745)
2015-02-24Use arrays instead of vectors in testsVadim Petrochenkov-51/+40
2015-02-24Add missing `fn`Michał Krasnoborski-1/+1
2015-02-24Stop parsing "-" as integer, fixes #22745Michał Krasnoborski-0/+5
2015-02-22Auto merge of #22466 - Kimundi:str_pattern_ai_safe, r=aturonbors-1/+267
This is not a complete implementation of the RFC: - only existing methods got updated, no new ones added - doc comments are not extensive enough yet - optimizations got lost and need to be reimplemented See https://github.com/rust-lang/rfcs/pull/528 Technically a [breaking-change]
2015-02-20try to reduce bajillion warningsAlexis-22/+31
2015-02-20Fix tidy and rebase falloutMarvin Löbel-2/+144
Added a few bugfixes and additional testcases
2015-02-20Added a Pattern impl that delegates to the dereference of a type.Marvin Löbel-0/+10
This allows to match with a `&String` or `&&str`, for example.
2015-02-20Refactored code into Searcher traits with naive implementationsMarvin Löbel-3/+3
Made the family of Split iterators use the Pattern API Renamed the Matcher traits into Searcher
2015-02-20Added string pattern traits and basic implementantionsMarvin Löbel-0/+7
2015-02-20Added benchmarks for string pattern matching functionsMarvin Löbel-0/+107
2015-02-18rollup merge of #22286: nikomatsakis/variance-4bAlex Crichton-3/+3
Conflicts: src/librustc/middle/infer/combine.rs src/librustc_typeck/check/wf.rs
2015-02-18rollup merge of #22502: nikomatsakis/deprecate-bracket-bracketAlex Crichton-7/+7
Conflicts: src/libcollections/slice.rs src/libcollections/str.rs src/librustc/middle/lang_items.rs src/librustc_back/rpath.rs src/librustc_typeck/check/regionck.rs src/libstd/ffi/os_str.rs src/libsyntax/diagnostic.rs src/libsyntax/parse/parser.rs src/libsyntax/util/interner.rs src/test/run-pass/regions-refcell.rs
2015-02-18Round 1 fixes and rebase conflictsAlex Crichton-2/+0
2015-02-18Replace all uses of `&foo[]` with `&foo[..]` en masse.Niko Matsakis-7/+7
2015-02-18rollup merge of #22497: nikomatsakis/suffixesAlex Crichton-31/+31
Conflicts: src/librustc_trans/trans/tvec.rs
2015-02-18rollup merge of #22480: alexcrichton/hashv3Alex Crichton-14/+10
This commit is an implementation of [RFC 823][rfc] which is another pass over the `std::hash` module for stabilization. The contents of the module were not entirely marked stable, but some portions which remained quite similar to the previous incarnation are now marked `#[stable]`. Specifically: [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0823-hash-simplification.md * `std::hash` is now stable (the name) * `Hash` is now stable * `Hash::hash` is now stable * `Hasher` is now stable * `SipHasher` is now stable * `SipHasher::new` and `new_with_keys` are now stable * `Hasher for SipHasher` is now stable * Many `Hash` implementations are now stable All other portions of the `hash` module remain `#[unstable]` as they are less commonly used and were recently redesigned. This commit is a breaking change due to the modifications to the `std::hash` API and more details can be found on the [RFC][rfc]. Closes #22467 [breaking-change]
2015-02-18rollup merge of #22287: Ryman/purge_carthographersAlex Crichton-22/+22
This overlaps with #22276 (I left make check running overnight) but covers a number of additional cases and has a few rewrites where the clones are not even necessary. This also implements `RandomAccessIterator` for `iter::Cloned` cc @steveklabnik, you may want to glance at this before #22281 gets the bors treatment
2015-02-18std: Stabilize the `hash` moduleAlex Crichton-14/+10
This commit is an implementation of [RFC 823][rfc] which is another pass over the `std::hash` module for stabilization. The contents of the module were not entirely marked stable, but some portions which remained quite similar to the previous incarnation are now marked `#[stable]`. Specifically: [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0823-hash-simplification.md * `std::hash` is now stable (the name) * `Hash` is now stable * `Hash::hash` is now stable * `Hasher` is now stable * `SipHasher` is now stable * `SipHasher::new` and `new_with_keys` are now stable * `Hasher for SipHasher` is now stable * Many `Hash` implementations are now stable All other portions of the `hash` module remain `#[unstable]` as they are less commonly used and were recently redesigned. This commit is a breaking change due to the modifications to the `std::hash` API and more details can be found on the [RFC][rfc]. Closes #22467 [breaking-change]
2015-02-18Fallout: tests. As tests frequently elide things, lots of changesNiko Matsakis-1/+1
here. Some of this may have been poorly rebased, though I tried to be careful and preserve the spirit of the test.
2015-02-18Rewrite `Unique<T>` so that it is covariant in T, implies `NonZero` and ↵Niko Matsakis-2/+2
ownership, and also follows the API of `NonZero` a bit more closely. More to do here I think (including perhaps a new name).
2015-02-18Convert required suffixes into a use of `as`.Niko Matsakis-31/+31
2015-02-18Remove usage of .map(|&foo| foo)Kevin Butler-21/+21
2015-02-18Opt for .cloned() over .map(|x| x.clone()) etc.Kevin Butler-1/+1
2015-02-17Fallout from stabilizationAaron Turon-3/+3
2015-02-15Fix rollup (remove slicing_syntax)Manish Goregaokar-1/+1
2015-02-12Auto merge of #21895 - alfie:libcoretest, r=pnkfelixbors-112/+112
2015-02-11Add core::marker::PhantomData.Felix S. Klock II-1/+1
Port `core::ptr::Unique` to have `PhantomData`. Add `PhantomData` to `TypedArena` and `Vec` as well. As a drive-by, switch `ptr::Unique` from a tuple-struct to a struct with fields.
2015-02-10Deprecating i/u suffixes in libcoretestAlfie John-112/+112
2015-02-10rollup merge of #22142: Kimundi/unsized_uniqueAlex Crichton-0/+9
This is to allow for use cases like sending a raw pointer slice across thread boundaries.
2015-02-10Made the `ptr::Unique` type accept unsized types, to allow for use casesMarvin Löbel-0/+9
like sending a raw pointer slice across thread boundaries.
2015-02-08Fix std::ops::Range size_hint and ExactSizeIterator implsUlrik Sverdrup-0/+1
When self.start > self.end, these iterators simply return None, so we adjust the size_hint to just return zero in this case. Certain optimizations can be implemented in and outside libstd if we know we can trust the size_hint for all inputs to for example Range<usize>. This corrects the ExactSizeIterator implementations, which IMO were unsound and incorrect previously, since they allowed a range like (2..1) to return a size_hint of -1us in when debug assertions are turned off.
2015-02-05cleanup: replace `as[_mut]_slice()` calls with deref coercionsJorge Aparicio-6/+6
2015-02-04remove all kind annotations from closuresJorge Aparicio-8/+9
2015-02-04Auto merge of #21892 - huonw:deprecate-rand, r=alexcrichtonbors-0/+1
Use [`rand`](https://crates.io/crates/rand) and [`derive_rand`](https://crates.io/crates/derive_rand) from crates.io. [breaking-change]
2015-02-04Deprecate in-tree `rand`, `std::rand` and `#[derive(Rand)]`.Huon Wilson-0/+1
Use the crates.io crate `rand` (version 0.1 should be a drop in replacement for `std::rand`) and `rand_macros` (`#[derive_Rand]` should be a drop-in replacement). [breaking-change]
2015-02-02rollup merge of #21854: alexcrichton/try-borrowAlex Crichton-0/+4
The existence of these two functions is at odds with our current [error conventions][conventions] which recommend that panicking and `Result`-like variants should not be provided together. [conventions]: https://github.com/rust-lang/rfcs/blob/master/text/0236-error-conventions.md#do-not-provide-both-result-and-fail-variants This commit adds a new `borrow_state` function returning a `BorrowState` enum to `RefCell` which serves as a replacemnt for the `try_borrow` and `try_borrow_mut` functions.
2015-02-02`for x in xs.iter()` -> `for x in &xs`Jorge Aparicio-7/+7
2015-02-01std: Deprecate RefCell::{try_borrow, try_borrow_mut}Alex Crichton-0/+4
The existence of these two functions is at odds with our current [error conventions][conventions] which recommend that panicking and `Result`-like variants should not be provided together. [conventions]: https://github.com/rust-lang/rfcs/blob/master/text/0236-error-conventions.md#do-not-provide-both-result-and-fail-variants This commit adds a new `borrow_state` function returning a `BorrowState` enum to `RefCell` which serves as a replacemnt for the `try_borrow` and `try_borrow_mut` functions.
2015-01-31Kill more `isize`sTobias Bucher-7/+7
2015-01-30Test fixes and rebase conflictsAlex Crichton-13/+13
Also some tidying up of a bunch of crate attributes
2015-01-30rollup merge of #21631: tbu-/isize_policeAlex Crichton-195/+195
Conflicts: src/libcoretest/iter.rs