about summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2015-01-29Auto merge of #21677 - japaric:no-range, r=alexcrichtonbors-191/+191
Note: Do not merge until we get a newer snapshot that includes #21374 There was some type inference fallout (see 4th commit) because type inference with `a..b` is not as good as with `range(a, b)` (see #21672). r? @alexcrichton
2015-01-29s/Show/Debug/gJorge Aparicio-33/+33
2015-01-29remove unused importsJorge Aparicio-1/+1
2015-01-29fix inference falloutJorge Aparicio-6/+6
2015-01-29convert remaining `range(a, b)` to `a..b`Jorge Aparicio-16/+16
2015-01-29`for x in range(a, b)` -> `for x in a..b`Jorge Aparicio-128/+128
sed -i 's/in range(\([^,]*\), *\([^()]*\))/in \1\.\.\2/g' **/*.rs
2015-01-29`range(a, b).foo()` -> `(a..b).foo()`Jorge Aparicio-13/+13
sed -i 's/ range(\([^,]*\), *\([^()]*\))\./ (\1\.\.\2)\./g' **/*.rs
2015-01-29Auto merge of #21730 - Manishearth:rollup, r=alexcrichtonbors-14/+7
Should clear our backlog of rollups from the queue
2015-01-29Auto merge of #21680 - japaric:slice, r=alexcrichtonbors-9/+9
Replaces `slice_*` method calls with slicing syntax, and removes `as_slice()` calls that are redundant due to `Deref`.
2015-01-29Rollup merge of 21654 - FlaPer87:unify-impls, r=alexcrichtonManish Goregaokar-13/+6
2015-01-29Rollup merge of #21640 - retep998:rmdir, r=alexcrichtonManish Goregaokar-1/+1
`_wrmdir` is literally just a wrapper around `RemoveDirectoryW`, so let's just use `RemoveDirectoryW`. r? @alexcrichton
2015-01-28Merge remote-tracking branch 'origin/master' into rollupManish Goregaokar-498/+632
Conflicts: src/libcollections/slice.rs src/libcore/nonzero.rs src/libcore/ops.rs
2015-01-28Rollup merge of #21676 - Victory:fix-deprication-in-random, r=alexcrichtonManish Goregaokar-31/+31
Cleanup mention of uint, use usize/us instead. This includes the example `println!("{}", 2u * x);`
2015-01-27Merge remote-tracking branch 'rust-lang/master'Brian Anderson-575/+600
Conflicts: src/libcore/cell.rs src/librustc_driver/test.rs src/libstd/old_io/net/tcp.rs src/libstd/old_io/process.rs
2015-01-27Rollup merge of #21602 - japaric:derive-copy, r=alexcrichtonManish Goregaokar-4/+4
2015-01-27cleanup: s/`v.slice*()`/`&v[a..b]`/g + remove redundant `as_slice()` callsJorge Aparicio-9/+9
2015-01-27accommodate new scoping rules in libstd unit tests.Felix S. Klock II-1/+1
2015-01-26Don't use if we can avoid itVictory-23/+23
2015-01-26cleanup depricated `uint` in rand mod and rand osVictory-31/+31
2015-01-26std: Rename Writer::write to Writer::write_allAlex Crichton-155/+159
In preparation for upcoming changes to the `Writer` trait (soon to be called `Write`) this commit renames the current `write` method to `write_all` to match the semantics of the upcoming `write_all` method. The `write` method will be repurposed to return a `usize` indicating how much data was written which differs from the current `write` semantics. In order to head off as much unintended breakage as possible, the method is being deprecated now in favor of a new name. [breaking-change]
2015-01-26Fallout of io => old_ioAlex Crichton-133/+133
2015-01-26std: Rename io to old_ioAlex Crichton-291/+311
In preparation for the I/O rejuvination of the standard library, this commit renames the current `io` module to `old_io` in order to make room for the new I/O modules. It is expected that the I/O RFCs will land incrementally over time instead of all at once, and this provides a fresh clean path for new modules to enter into as well as guaranteeing that all old infrastructure will remain in place for some time. As each `old_io` module is replaced it will be deprecated in-place for new structures in `std::{io, fs, net}` (as appropriate). This commit does *not* leave a reexport of `old_io as io` as the deprecation lint does not currently warn on this form of use. This is quite a large breaking change for all imports in existing code, but all functionality is retained precisely as-is and path statements simply need to be renamed from `io` to `old_io`. [breaking-change]
2015-01-26Make Unix and Windows impls consistentFlavio Percoco-4/+0
There are some explicit Send/Sync implementations for Window's types that don't exist in Unix. While the end result will be the same, I believe it's clearer if we keep the explicit implementations consistent by making the os-specific types Send/Sync where needed and possible. This commit addresses tcp. Existing differences below: src/libstd/sys/unix/tcp.rs unsafe impl Sync for TcpListener {} unsafe impl Sync for AcceptorInner {} src/libstd/sys/windows/tcp.rs unsafe impl Send for Event {} unsafe impl Sync for Event {} unsafe impl Send for TcpListener {} unsafe impl Sync for TcpListener {} unsafe impl Send for TcpAcceptor {} unsafe impl Sync for TcpAcceptor {} unsafe impl Send for AcceptorInner {} unsafe impl Sync for AcceptorInner {}
2015-01-26Make Unix and Windows impls consistentFlavio Percoco-9/+6
There are some explicit Send/Sync implementations for Window's types that don't exist in Unix. While the end result will be the same, I believe it's clearer if we keep the explicit implementations consistent by making the os-specific types Send/Sync where needed and possible. This commit addresses pipe src/libstd/sys/unix/pipe.rs unsafe impl Send for UnixListener {} unsafe impl Sync for UnixListener {} src/libstd/sys/windows/pipe.rs unsafe impl Send for UnixStream {} unsafe impl Sync for UnixStream {} unsafe impl Send for UnixListener {} unsafe impl Sync for UnixListener {} unsafe impl Send for UnixAcceptor {} unsafe impl Sync for UnixAcceptor {} unsafe impl Send for AcceptorState {} unsafe impl Sync for AcceptorState {}
2015-01-25Merge remote-tracking branch 'rust-lang/master'Brian Anderson-10/+1802
Conflicts: src/libcore/cmp.rs src/libcore/fmt/mod.rs src/libcore/iter.rs src/libcore/marker.rs src/libcore/num/f32.rs src/libcore/num/f64.rs src/libcore/result.rs src/libcore/str/mod.rs src/librustc/lint/builtin.rs src/librustc/lint/context.rs src/libstd/sync/mpsc/mod.rs src/libstd/sync/poison.rs
2015-01-25wrmdir -> RemoveDirectoryWPeter Atashian-1/+1
Signed-off-by: Peter Atashian <retep998@gmail.com>
2015-01-25cleanup: s/impl Copy/#[derive(Copy)]/gJorge Aparicio-4/+4
2015-01-25Auto merge of #20613 - dgriffen:master, r=alexcrichtonbors-1/+40
2015-01-25Merge remote-tracking branch 'rust-lang/master'Brian Anderson-585/+335
Conflicts: mk/tests.mk src/liballoc/arc.rs src/liballoc/boxed.rs src/liballoc/rc.rs src/libcollections/bit.rs src/libcollections/btree/map.rs src/libcollections/btree/set.rs src/libcollections/dlist.rs src/libcollections/ring_buf.rs src/libcollections/slice.rs src/libcollections/str.rs src/libcollections/string.rs src/libcollections/vec.rs src/libcollections/vec_map.rs src/libcore/any.rs src/libcore/array.rs src/libcore/borrow.rs src/libcore/error.rs src/libcore/fmt/mod.rs src/libcore/iter.rs src/libcore/marker.rs src/libcore/ops.rs src/libcore/result.rs src/libcore/slice.rs src/libcore/str/mod.rs src/libregex/lib.rs src/libregex/re.rs src/librustc/lint/builtin.rs src/libstd/collections/hash/map.rs src/libstd/collections/hash/set.rs src/libstd/sync/mpsc/mod.rs src/libstd/sync/mutex.rs src/libstd/sync/poison.rs src/libstd/sync/rwlock.rs src/libsyntax/feature_gate.rs src/libsyntax/test.rs
2015-01-25Auto merge of #21558 - alexcrichton:result-debug, r=aturonbors-4/+36
This commit relaxes the bound on `Result::unwrap` and `Result::unwrap_err` from the `Display` trait to the `Debug` trait for generating an error message about the unwrapping operation. This commit is a breaking change and any breakage should be mitigated by ensuring that `Debug` is implemented on the relevant type. [breaking-change]
2015-01-24Add ffi::OsString and OsStrAaron Turon-5/+1725
Per [RFC 517](https://github.com/rust-lang/rfcs/pull/575/), this commit introduces platform-native strings. The API is essentially as described in the RFC. The WTF-8 implementation is adapted from @SimonSapin's [implementation](https://github.com/SimonSapin/rust-wtf8). To make this work, some encodign and decoding functionality in `libcore` is now exported in a "raw" fashion reusable for WTF-8. These exports are *not* reexported in `std`, nor are they stable.
2015-01-24Implement winsize() for unix.Daniel Griffen-1/+40
2015-01-23grandfathered -> rust1Brian Anderson-280/+280
2015-01-23Deprecated attributes don't take 'feature' names and are paired with ↵Brian Anderson-13/+25
stable/unstable Conflicts: src/libcore/atomic.rs src/libcore/finally.rs src/test/auxiliary/inherited_stability.rs src/test/auxiliary/lint_stability.rs
2015-01-23std: Relax Result::unwrap() to DebugAlex Crichton-4/+36
This commit relaxes the bound on `Result::unwrap` and `Result::unwrap_err` from the `Display` trait to the `Debug` trait for generating an error message about the unwrapping operation. This commit is a breaking change and any breakage should be mitigated by ensuring that `Debug` is implemented on the relevant type. [breaking-change]
2015-01-23Set unstable feature names appropriatelyBrian Anderson-166/+172
* `core` - for the core crate * `hash` - hashing * `io` - io * `path` - path * `alloc` - alloc crate * `rand` - rand crate * `collections` - collections crate * `std_misc` - other parts of std * `test` - test crate * `rustc_private` - everything else
2015-01-22Add a missing stable attributeBrian Anderson-0/+1
2015-01-22Rollup merge of #21477 - steveklabnik:gh21440, r=alexcrichtonSteve Klabnik-1/+9
Fixes #21440"
2015-01-22Rollup merge of #21325 - nagisa:thread-panicking, r=steveklabnikSteve Klabnik-2/+2
Previous wording wasn’t clear about its actual behaviour. It could be interpreted as answering either: * Can current thread panic? * Is current thread unwinding because of panic? r? @steveklabnik
2015-01-22Rollup merge of #21217 - Gankro:docadoca, r=steveklabnikSteve Klabnik-2/+52
Not sure on what *exactly* should be said here, but I think this is the most important bit. This PR also establishes conventions for describing performance minimally. I suggest to describe preformance for individual methods we use a `# Performance` heading. Not sure if we should have ``` # Performance: O(1) details details ``` or ``` # Performance: O(1) details details ``` Since I think most methods don't need discussion, the former seems more resonable. But it's kind of weird to have info "in" the heading. r? @steveklabnik
2015-01-22Put #[staged_api] behind the 'staged_api' gateBrian Anderson-0/+1
2015-01-21Remove 'since' from unstable attributesBrian Anderson-165/+165
2015-01-21Tie stability attributes to feature gatesBrian Anderson-9/+2
2015-01-21Add 'feature' and 'since' to stability attributesBrian Anderson-472/+593
2015-01-21More test fixes and rebase conflictsAlex Crichton-1/+1
2015-01-21Improve RwLock::new's docsSteve Klabnik-1/+9
Fixes #21440"
2015-01-21rollup merge of #21258: aturon/stab-3-indexAlex Crichton-29/+29
Conflicts: src/libcore/ops.rs src/librustc_typeck/astconv.rs src/libstd/io/mem.rs src/libsyntax/parse/lexer/mod.rs
2015-01-21Test fixes and rebase conflictsAlex Crichton-3/+4
2015-01-21rollup merge of #21457: alexcrichton/issue-21436Alex Crichton-266/+127
Conflicts: src/liballoc/boxed.rs src/librustc/middle/traits/error_reporting.rs src/libstd/sync/mpsc/mod.rs
2015-01-21rollup merge of #21444: petrochenkov/nullAlex Crichton-34/+41
Conflicts: src/libstd/sync/mpsc/select.rs