summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2014-12-17rollup merge of #19873: drewm1980/masterAlex Crichton-11/+11
In US english, "that" is used in restrictive clauses in place of "which", and often affects the meaning of sentences. In UK english and many dialects, no distinction is made. While Rust devs want to avoid unproductive pedanticism, it is worth at least being uniform in documentation such as: http://doc.rust-lang.org/std/iter/index.html and also in cases where correct usage of US english clarifies the sentence.
2014-12-17rollup merge of #19869: sfackler/free-stdinAlex Crichton-0/+7
r? @aturon
2014-12-17rollup merge of #19868: sourcefrog/masterAlex Crichton-3/+6
The rendered form in http://doc.rust-lang.org/nightly/std/rand/struct.OsRng.html looks wrong.
2014-12-17rollup merge of #19859: alexcrichton/flaky-testAlex Crichton-1/+2
This test would read with a timeout and then send a UDP message, expecting the message to be received. The receiving port, however, was bound in the child thread so it could be the case that the timeout and send happens before the child thread runs. To remedy this we just bind the port before the child thread runs, moving it into the child later on. cc #19120
2014-12-17rollup merge of #19832: japaric/no-nocopyAlex Crichton-14/+6
r? @aturon / @alexcrichton
2014-12-17rollup merge of #19770: csouth3/iterator-wrapperstructsAlex Crichton-57/+89
Using a type alias for iterator implementations is fragile since this exposes the implementation to users of the iterator, and any changes could break existing code. This PR changes the iterators of `BTreeMap`, `BTreeSet`, `HashMap`, and `HashSet` to use proper new types, rather than type aliases. However, since it is fair-game to treat a type-alias as the aliased type, this is a: [breaking-change].
2014-12-17auto merge of #19800 : sfackler/rust/core-hash, r=alexcrichtonbors-1/+1
r? @alexcrichton
2014-12-17Replaced wrapper functions with no_run and as_str().unwrap() with display()elszben-6/+3
2014-12-16Fix typoVadim Chugunov-1/+1
2014-12-17auto merge of #19761 : nick29581/rust/coerce-double, r=nikomatsakisbors-5/+5
Part of #18469 [breaking-change] A receiver will only ever get a single auto-reference. Previously arrays and strings would get two, e.g., [T] would be auto-ref'ed to &&[T]. This is usually apparent when a trait is implemented for `&[T]` and has a method takes self by reference. The usual solution is to implement the trait for `[T]` (the DST form). r? @nikomatsakis (or anyone else, really)
2014-12-16Small cleanups in HashMap based off of new rust features.Clark Gaebel-88/+41
2014-12-16Added example to TempDirelszben-0/+53
2014-12-16auto merge of #19647 : nielsegberts/rust/master, r=pnkfelixbors-6/+6
The names expected and actual are not used anymore in the output. It also removes the confusion that the argument order is the opposite of junit. Bug #7330 is relevant.
2014-12-16auto merge of #19777 : nikomatsakis/rust/warn-on-shadowing, r=acrichtobors-5/+5
per rfc 459 cc https://github.com/rust-lang/rust/issues/19390 One question is: should we start by warning, and only switch to hard error later? I think we discussed something like this in the meeting. r? @alexcrichton
2014-12-15Move hash module from collections to coreSteven Fackler-1/+1
2014-12-16Remove the double auto-ref on arrays/strings as receiversNick Cameron-5/+5
Part of #18469 [breaking-change] A receiver will only ever get a single auto-reference. Previously arrays and strings would get two, e.g., [T] would be auto-ref'ed to &&[T]. This is usually apparent when a trait is implemented for `&[T]` and has a method takes self by reference. The usual solution is to implement the trait for `[T]` (the DST form).
2014-12-15std: Second pass stabilization of `default`Alex Crichton-0/+8
This commit performs a second pass stabilization of the `std::default` module. The module was already marked `#[stable]`, and the inheritance of `#[stable]` was removed since this attribute was applied. This commit adds the `#[stable]` attribute to the trait definition and one method name, along with all implementations found in the standard distribution.
2014-12-16auto merge of #19747 : alexcrichton/rust/slice-one-trait, r=brsonbors-46/+37
This commit collapses the various prelude traits for slices into just one trait: * SlicePrelude/SliceAllocPrelude => SliceExt * CloneSlicePrelude/CloneSliceAllocPrelude => CloneSliceExt * OrdSlicePrelude/OrdSliceAllocPrelude => OrdSliceExt * PartialEqSlicePrelude => PartialEqSliceExt
2014-12-15Use wrapper structs for `HashSet`'s iterators.Chase Southwood-20/+59
Using a type alias for iterator implementations is fragile since this exposes the implementation to users of the iterator, and any changes could break existing code. This commit changes the iterators of `HashSet` to use proper new types, rather than type aliases. However, since it is fair-game to treat a type-alias as the aliased type, this is a: [breaking-change].
2014-12-15Use wrapper structs for `HashMap`'s iterators.Chase Southwood-38/+31
Using a type alias for iterator implementations is fragile since this exposes the implementation to users of the iterator, and any changes could break existing code. This commit changes the keys and values iterators of `HashMap` to use proper new types, rather than type aliases. However, since it is fair-game to treat a type-alias as the aliased type, this is a: [breaking-change].
2014-12-15auto merge of #19448 : japaric/rust/binops-by-value, r=nikomatsakisbors-11/+121
- The following operator traits now take their arguments by value: `Add`, `Sub`, `Mul`, `Div`, `Rem`, `BitAnd`, `BitOr`, `BitXor`, `Shl`, `Shr`. This breaks all existing implementations of these traits. - The binary operation `a OP b` now "desugars" to `OpTrait::op_method(a, b)` and consumes both arguments. - `String` and `Vec` addition have been changed to reuse the LHS owned value, and to avoid internal cloning. Only the following asymmetric operations are available: `String + &str` and `Vec<T> + &[T]`, which are now a short-hand for the "append" operation. [breaking-change] --- This passes `make check` locally. I haven't touch the unary operators in this PR, but converting them to by value should be very similar to this PR. I can work on them after this gets the thumbs up. @nikomatsakis r? the compiler changes @aturon r? the library changes. I think the only controversial bit is the semantic change of the `Vec`/`String` `Add` implementation. cc #19148
2014-12-15libstd: add a dummy field to `OsRng` to avoid out of module constructionJorge Aparicio-2/+5
2014-12-15Remove internal uses of `marker::NoCopy`Jorge Aparicio-16/+5
2014-12-15Remove all shadowed lifetimes.Niko Matsakis-5/+5
2014-12-15rollup merge of #19787: akiss77/fix-i8-c_charBrian Anderson-1/+1
On AArch64, libc::c_char is u8. There are some places in the code where i8 is assumed, which causes compilation errors. (AArch64 is not officially supported yet, but this change does not hurt any other targets and makes the code future-proof.)
2014-12-15rollup merge of #19710: steveklabnik/gh15449Brian Anderson-7/+7
Fixes #15499.
2014-12-15Standardize some usages of "which" in docstringsAndrew Wagner-11/+11
In US english, "that" is used in restrictive clauses in place of "which", and often affects the meaning of sentences. In UK english and many dialects, no distinction is made. While Rust devs want to avoid unproductive pedanticism, it is worth at least being uniform in documentation such as: http://doc.rust-lang.org/std/iter/index.html and also in cases where correct usage of US english clarifies the sentence.
2014-12-14Free stdin on exitSteven Fackler-0/+7
2014-12-14Fix Markdown syntax in docs for OsRngMartin Pool-3/+6
2014-12-14std: Collapse SlicePrelude traitsAlex Crichton-46/+37
This commit collapses the various prelude traits for slices into just one trait: * SlicePrelude/SliceAllocPrelude => SliceExt * CloneSlicePrelude/CloneSliceAllocPrelude => CloneSliceExt * OrdSlicePrelude/OrdSliceAllocPrelude => OrdSliceExt * PartialEqSlicePrelude => PartialEqSliceExt
2014-12-14std: Bind port early to make a test more reliableAlex Crichton-1/+2
This test would read with a timeout and then send a UDP message, expecting the message to be received. The receiving port, however, was bound in the child thread so it could be the case that the timeout and send happens before the child thread runs. To remedy this we just bind the port before the child thread runs, moving it into the child later on. cc #19120
2014-12-15auto merge of #19742 : vhbit/rust/copy-for-bitflags, r=alexcrichtonbors-10/+1
2014-12-14Mostly rote conversion of `proc()` to `move||` (and occasionally `Thunk::new`)Niko Matsakis-272/+284
2014-12-14Rewrite threading infrastructure, introducing `Thunk` to representNiko Matsakis-87/+115
boxed `FnOnce` closures.
2014-12-13libstd: fix unit testsJorge Aparicio-11/+13
2014-12-13libstd: convert `Duration` binops to by valueJorge Aparicio-0/+64
2014-12-13libstd: convert `BitFlags` binops to by valueJorge Aparicio-0/+44
2014-12-13Get rid of all the remaining uses of `refN`/`valN`/`mutN`/`TupleN`Jorge Aparicio-2/+2
2014-12-13libstd: use tuple indexingJorge Aparicio-4/+4
2014-12-13Windows dbghelp strips leading underscores from symbols, so let's accept ↵Vadim Chugunov-8/+25
"ZN...E" form too. Also, print PC displacement from symbols.
2014-12-13libstd: add missing importsJorge Aparicio-0/+2
2014-12-13libstd: use unboxed closuresJorge Aparicio-95/+171
2014-12-13libstd: fix falloutJorge Aparicio-0/+1
2014-12-13libstd: fix falloutJorge Aparicio-1/+1
2014-12-13libstd: fix falloutJorge Aparicio-3/+2
2014-12-13libstd: fix falloutJorge Aparicio-14/+22
2014-12-13libstd: fix falloutJorge Aparicio-16/+28
2014-12-13Add `Copy` to bitflags-generated structuresValerii Hiora-10/+1
2014-12-13auto merge of #19664 : tbu-/rust/pr_oibit2_fix, r=Gankrobors-29/+21
These probably happened during the merge of the commit that made `Copy` opt-in. Also, convert the last occurence of `/**` to `///` in `src/libstd/num/strconv.rs`
2014-12-12libc::c_char is not necessarily i8Akos Kiss-1/+1