summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2015-02-17openbsd: adapt connect_error testSébastien Marie-2/+5
The connect_error test check if connecting to "0.0.0.0:1" works (it shouldn't). And in case of error, the test expects a ConnectionRefused error. Under OpenBSD, trying to connect to "0.0.0.0" isn't a ConnectionRefused: it is an InvalidInput error. The patch allow the error to be ConnectionRefused or InvalidInput.
2015-02-17Auto merge of #22397 - Manishearth:rollup, r=huonwbors-9/+91
None
2015-02-16Make io::Seek docs less prescriptiveSteven Fackler-3/+2
2015-02-17Auto merge of #21932 - Jormundir:std-os-errno-type, r=alexcrichtonbors-13/+13
Changes std::os::errno to return i32, the return type used by the function being delegated to. This is my first contribution, so feel free to give me advice. I'll be happy to correct things.
2015-02-17Rollup merge of #22411 - aturon:fix-os-deprecation, r=alexcrichtonManish Goregaokar-4/+4
They now point to the correct locations in std::env r? @alexcrichton
2015-02-17Rollup merge of #22313 - japaric:iter, r=aturonManish Goregaokar-0/+80
`IntoIterator` now has an extra associated item: ``` rust trait IntoIterator { type Item; type IntoIter: Iterator<Self=Self::Item>; } ``` This lets you bind the iterator \"`Item`\" directly when writing generic functions: ``` rust // hypothetical change, not included in this PR impl Extend<T> for Vec<T> { // you can now write fn extend<I>(&mut self, it: I) where I: IntoIterator<Item=T> { .. } // instead of fn extend<I: IntoIterator>(&mut self, it: I) where I::IntoIter: Iterator<Item=T> { .. } } ``` The downside is that now you have to write an extra associated type in your `IntoIterator` implementations: ``` diff impl<T> IntoIterator for Vec<T> { + type Item = T; type IntoIter = IntoIter<T>; fn into_iter(self) -> IntoIter<T> { .. } } ``` Because this breaks all downstream implementations of `IntoIterator`, this is a [breaking-change] --- r? @aturon
2015-02-17Rollup merge of #22374 - richo:warn-fixup, r=huonwManish Goregaokar-1/+0
This snuck through my refactor. Would it be worth the effort to have a test pass that attempts to lint the code for all targets, even if it's not feasible to actually build and test it?
2015-02-17Rollup merge of #22363 - semarie:openbsd-test_file_desc, r=alexcrichtonManish Goregaokar-1/+4
`pipe(2)`, under FreeBSD and OpenBSD return a bidirectionnal pipe. So reading from the writer would block (waiting data) instead of returning an error. like for FreeBSD, disable the test for OpenBSD.
2015-02-17Rollup merge of #22353 - tshepang:improve-fs-create-docs, r=alexcrichtonManish Goregaokar-3/+3
2015-02-16Deprecate std::sync::TaskPoolAaron Turon-5/+5
Rather than stabilize on the current API, we're going to punt this concern to crates.io, to allow for faster iteration. If you need this functionality, you might look at https://github.com/carllerche/syncbox [breaking-change]
2015-02-16Expose more of std::pathAaron Turon-123/+126
This commit exposes the `is_sep` function and `MAIN_SEP` constant, as well as Windows path prefixes. The path prefix enum is safely exposed on all platforms, but it only yielded as a component for Windows. Exposing the prefix enum as part of prefix components involved changing the type from `OsStr` to the `Prefix` enum, which is a: [breaking-change]
2015-02-16Update std::os deprecation warningsAaron Turon-4/+4
They now point to the correct locations in std::env
2015-02-16Document std::num::Float with examplesmdinger-42/+777
2015-02-16change the signal used to test signal_reported_rightSébastien Marie-6/+6
The test "signal_reported_right" send a signal `1` to `/bin/sh`, and check the status code to check if the signal is reported right. Under OpenBSD, the signal `1` (`SIGHUP`) is catched by `/bin/sh`, resulting the test failed. Use the uncatchable signal `9` (`SIGKILL`) for test.
2015-02-16Implement ExactSizeIterator for Args and ArgsOsSimonas Kazlauskas-0/+16
Fixes #22343
2015-02-16Auto merge of #22367 - Manishearth:rollup, r=steveklabnikbors-43/+52
(still testing locally)
2015-02-15lint: fixup extraneous #[allow]Richo Healey-1/+0
This snuck through my refactor
2015-02-15Fix rollup (remove slicing_syntax)Manish Goregaokar-1/+0
2015-02-15Rollup merge of #22297 - nagisa:spring-cleanup, r=alexcrichtonManish Goregaokar-8/+8
This PR replaces uses of `os::getenv` with newly introduced `env::var{,_os}`. Mostly did this as a background activity to procrastinate from procrastinating. Tests appear to build and run fine. This includes benchmarks from test/bench directory.
2015-02-15Rollup merge of #22339 - petrochenkov:int, r=huonwManish Goregaokar-23/+23
Some function signatures have changed, so this is a [breaking-change]. In particular, radixes and numerical values of digits are represented by `u32` now. Part of #22240
2015-02-15Rollup merge of #22351 - blaenk:path-hash, r=huonwManish Goregaokar-0/+1
`PathBuf` does implement `Hash`, but `Path` doesn't. This makes it annoying if you have a `HashMap` with `PathBuf`s as keys, because it means you have to convert a `Path` into a `PathBuf` and get a reference to it simply to perform operations on the `HashMap`!
2015-02-15Rollup merge of #22347 - iKevinY:std-lib-panicking, r=brsonManish Goregaokar-6/+6
Rename `libstd/failure.rs` to `libstd/panicking.rs` and `on_fail` to `on_panic`. Closes #22306.
2015-02-15Rollup merge of #22328 - shepmaster:os_str_typo, r=steveklabnikManish Goregaokar-1/+1
2015-02-15Rollup merge of #22268 - steveklabnik:improve_wait, r=nikomatsakisManish Goregaokar-4/+11
Remove incorrect claim, add example, reformat and re-word. Fixes #22266
2015-02-15Rollup merge of #22254 - huonw:float-value--, r=aturonManish Goregaokar-0/+2
In `std::f32` and `std::f64`: - `MIN_VALUE` → `MIN` - `MAX_VALUE` → `MAX` - `MIN_POS_VALUE` → `MIN_POSITIVE` This matches the corresponding integer constants. [breaking-change]
2015-02-15Auto merge of #22242 - Gankro:collect-ints, r=alexcrichtonbors-27/+27
2015-02-15openbsd: disable test_file_desc testSébastien Marie-1/+4
pipe(2), under FreeBSD and OpenBSD return a bidirectionnal pipe. So reading from the writer would block (waiting data) instead of returning an error.
2015-02-15doc: fix and expand File::create explanationTshepang Lekhonkhobe-3/+3
2015-02-15Fix the falloutVadim Petrochenkov-21/+21
2015-02-15Audit integer types in libunicode, libcore/(char, str) and libstd/asciiVadim Petrochenkov-2/+2
2015-02-14Correct typoJake Goulding-1/+1
2015-02-14we forgot to make `Path` implement `Hash`Jorge Israel Peña-0/+1
`PathBuf` does implement `Hash`, but `Path` doesn't. This makes it annoying if you have a `HashMap` with `PathBuf`s as keys, because it means you have to convert a `Path` into a `PathBuf` and get a reference to it simply to perform operations on the `HashMap`!
2015-02-13Add std::processAaron Turon-36/+2051
Per [RFC 579](https://github.com/rust-lang/rfcs/pull/579), this commit adds a new `std::process` module. This module is largely based on the existing `std::old_io::process` module, but refactors the API to use `OsStr` and other new standards set out by IO reform. The existing module is not yet deprecated, to allow for the new API to get a bit of testing before a mass migration to it.
2015-02-13Rename std::failure to std::panickingKevin Yap-6/+6
Closes #22306.
2015-02-13add an associated `Item` type to `IntoIterator`Jorge Aparicio-0/+80
2015-02-14Rename `fmt::Writer` to `fmt::Write`Chris Wong-8/+8
This brings it in line with its namesake in `std::io`. [breaking-change]
2015-02-13Remove a few uses of deprecated getenvSimonas Kazlauskas-8/+8
2015-02-13more int and cloned cleanup in collectionsAlexis-27/+27
2015-02-13Improve documentation for `Select::new()`.Steve Klabnik-4/+11
Remove incorrect claim, add example, reformat and re-word. Fixes #22266
2015-02-13Remove `_VALUE` from the float extremes constants.Huon Wilson-0/+2
In `std::f32` and `std::f64`: - `MIN_VALUE` → `MIN` - `MAX_VALUE` → `MAX` - `MIN_POS_VALUE` → `MIN_POSITIVE` This matches the corresponding integer constants. [breaking-change]
2015-02-11fix windows specific errno type errors.Jormundir-3/+3
2015-02-11More test fixes and rebase conflictsAlex Crichton-1/+44
2015-02-11rollup merge of #22015: alexcrichton/netv2Alex Crichton-6/+3214
This commit is an implementation of [RFC 807][rfc] which adds a `std::net` module for basic neworking based on top of `std::io`. This module serves as a replacement for the `std::old_io::net` module and networking primitives in `old_io`. [rfc]: fillmein The major focus of this redesign is to cut back on the level of abstraction to the point that each of the networking types is just a bare socket. To this end functionality such as timeouts and cloning has been removed (although cloning can be done through `duplicate`, it may just yield an error). With this `net` module comes a new implementation of `SocketAddr` and `IpAddr`. This work is entirely based on #20785 and the only changes were to alter the in-memory representation to match the `libc`-expected variants and to move from public fields to accessors.
2015-02-11std: Add a `net` module for TCP/UDPAlex Crichton-6/+3214
This commit is an implementation of [RFC 807][rfc] which adds a `std::net` module for basic neworking based on top of `std::io`. This module serves as a replacement for the `std::old_io::net` module and networking primitives in `old_io`. [rfc]: fillmein The major focus of this redesign is to cut back on the level of abstraction to the point that each of the networking types is just a bare socket. To this end functionality such as timeouts and cloning has been removed (although cloning can be done through `duplicate`, it may just yield an error). With this `net` module comes a new implementation of `SocketAddr` and `IpAddr`. This work is entirely based on #20785 and the only changes were to alter the in-memory representation to match the `libc`-expected variants and to move from public fields to accessors.
2015-02-11Test fixes and rebase conflictsAlex Crichton-3/+7
2015-02-11fixing PR review commentsDave Huseby-9/+4
2015-02-11PR review fixesDave Huseby-12/+2
2015-02-11fixing more trailing whitespaceDave Huseby-1/+1
2015-02-11fixing trailing whitespace errorsDave Huseby-10/+10
2015-02-11bitrig integrationDave Huseby-18/+236