summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2015-02-17Auto merge of #21774 - ejjeong:enable-test-for-android, r=alexcrichtonbors-1/+9
- Now "make check-stage2-T-aarch64-linux-android-H-x86_64-unknown-linux-gnu" works (#21773) - Fix & enable debuginfo tests for android (#10381) - Fix & enable more tests for android (both for arm/aarch64) - Enable many already-pass tests on android (both for arm/aarch64)
2015-02-17std: Stabilize the IntoIterator traitAlex Crichton-0/+5
Now that the necessary associated types exist for the `IntoIterator` trait this commit stabilizes the trait as-is as well as all existing implementations.
2015-02-17Auto merge of #22311 - lfairy:consistent-fmt, r=alexcrichtonbors-8/+8
This brings it in line with its namesake in `std::io`. [breaking-change] r? @aturon
2015-02-17fix windowsManish Goregaokar-2/+2
2015-02-17Rollup merge of #22030 - mdinger:f32_examples, r=steveklabnikManish Goregaokar-42/+777
Some examples for `std::num::Float` ~~This is WIP for making examples for `f32`. This probably won't pass `make tidy` and I'm not sure which `f32` needs documentation. https://github.com/rust-lang/rust/issues/22025 shows 2 sets of `f32` which seems split between `core` and `std`. I'm not sure which should be documented but I started doing a couple from `std`. Easy to move if that's where they go...~~ ~~Gotta build it eventually to actually see if the docs actually appear where I think they will or if I'm just disillusioned.~~ cc @steveklabnik
2015-02-17Rollup merge of #22311 - lfairy:consistent-fmt, r=alexcrichtonManish Goregaokar-8/+8
This brings it in line with its namesake in `std::io`. [breaking-change] r? @aturon
2015-02-17Rollup merge of #22404 - semarie:signal_reported_right, r=aturonManish Goregaokar-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-17Rollup merge of #22433 - sfackler:seek-docs, r=aturonManish Goregaokar-3/+2
r? @aturon
2015-02-17Rollup merge of #22402 - nagisa:spring-cleanup-2, r=nikomatsakisManish Goregaokar-0/+16
This commit mostly replaces some of the uses of os::args with env::args. This, for obvious reasons is based on top of #22400. Do not r+ before that lands.
2015-02-17Fix a small typo in libstd/fs.rsMarkus Siemens-1/+1
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-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