about summary refs log tree commit diff
path: root/src/libstd/io
AgeCommit message (Collapse)AuthorLines
2016-11-28Move stdout/err flush into sysJeremy Soller-6/+0
2016-11-19Merge branch 'master' into redoxJeremy Soller-1/+4
2016-11-10Merge branch 'master' into redoxJeremy Soller-34/+74
2016-11-10Fixes for stdio and processes on RedoxJeremy Soller-0/+6
2016-11-10Remove one bounds check from BufReaderArthur Silva-1/+4
Otherwise the optimizer can't be sure that pos <= cap. Added a paranoid debug_assert to ensure correctness instead.
2016-11-08Rollup merge of #37588 - GuillaumeGomez:missing_io_urls, r=frewsxcvSteve Klabnik-11/+19
Add missing urls on io structs r? @steveklabnik
2016-11-05Rollup merge of #37537 - GuillaumeGomez:error_kind_doc, r=steveklabnikAlex Crichton-2/+7
Add missing urls for ErrorKind's variants r? @steveklabnik
2016-11-05add missing urls on io structsGuillaume Gomez-11/+19
2016-11-04Auto merge of #37037 - Mark-Simulacrum:stack-error, r=alexcrichtonbors-21/+48
Add conversions from `io:ErrorKind` to `io::Error` Filing to help with discussion around the possibility of doing this. Current changes are clearly backwards incompatible, but I think adding a new function (with a bikeshed on naming) like `Error::new_str` should be possible (or some other way of specializing the string error message case) to fix #36658.
2016-11-02Add missing urls for ErrorKind's variantsGuillaume Gomez-2/+7
2016-11-02Auto merge of #36948 - brson:sys, r=brsonbors-10/+2
More refactoring to obey platform abstraction lint The most interesting things here are moving `std/sys/common` to `std/sys_common`, and `std/num/{f32,f64}.rs` to `std/{f32,f64}.rs`, and adding more documentation to `std/lib.rs`. r? @alexcrichton
2016-11-02Add a new non-heap allocated variant to io::Error's representation.Mark-Simulacrum-21/+48
Implement From<ErrorKind> for io::Error, intended for use with errors that should never be exposed to the user.
2016-11-01std: Move a plattform-specific constant to sys::stdioBrian Anderson-10/+2
2016-11-01Rollup merge of #37316 - ollie27:docs_links, r=GuillaumeGomezGuillaume Gomez-2/+2
Fix a few links in the docs r? @steveklabnik
2016-10-31Changed most vec! invocations to use square bracesiirelu-6/+6
Most of the Rust community agrees that the vec! macro is clearer when called using square brackets [] instead of regular brackets (). Most of these ocurrences are from before macros allowed using different types of brackets. There is one left unchanged in a pretty-print test, as the pretty printer still wants it to have regular brackets.
2016-10-27Add documentation for Read, Write impls for slices and VecUlrik Sverdrup-0/+11
The Write impls for &[u8] and Vec<u8> are quite different, and we need this to be reflected in the docs. These documentation comments will be visible on the respective type's page in the trait impls section.
2016-10-21Fix a few links in the docsOliver Middleton-2/+2
2016-10-19Rollup merge of #37165 - GuillaumeGomez:bytes_url, r=kmcallisterGuillaume Gomez-6/+12
Add missing urls for io types r? @steveklabnik
2016-10-18Typos in some linkageGuillaume Gomez-41/+52
2016-10-14Rollup merge of #37115 - GuillaumeGomez:buf_reader_urls, r=kmcallisterJonathan Turner-5/+13
add missing urls for BufWriter and BufReader r? @steveklabnik
2016-10-14Add missing urls for io typesGuillaume Gomez-6/+12
2016-10-12Rollup merge of #37089 - GuillaumeGomez:io_urls, r=frewsxcvAlex Crichton-32/+37
Add missing urls in io module r? @steveklabnik
2016-10-12add missing urls for BufWriter and BufReaderGuillaume Gomez-5/+13
2016-10-12Deprecate `Reflect`Nick Cameron-2/+1
[tracking issue](https://github.com/rust-lang/rust/issues/27749)
2016-10-11Add missing urls in io moduleGuillaume Gomez-32/+37
2016-10-05Fixed small typo in `BufRead` commentsRazican-1/+1
`BufRead` comments, in the `Seek` trait implementation, was talking about allocating 8 *ebibytes*. It was a typo, the correct unit is *exbibytes*, since *ebibytes* don't even exist. The calculation is correct, though.
2016-10-04Rollup merge of #36938 - tmiasko:cursor-seek-overflow, r=alexcrichtonManish Goregaokar-7/+18
Check for overflow in Cursor<Vec<u8>>::write. Ensure that cursor position fits into usize, before proceeding with write. Fixes issue #36884.
2016-10-04Rollup merge of #36916 - frewsxcv:patch-1, r=alexcrichtonManish Goregaokar-1/+1
Update unstable attr to reference tracking issue.
2016-10-03Check for overflow in Cursor<Vec<u8>>::write.Tomasz Miąsko-7/+18
Ensure that cursor position fits into usize, before proceeding with write. Fixes issue #36884.
2016-10-02Update unstable attr to reference tracking issue.Corey Farwell-1/+1
2016-10-01std: Move platform specific stdio code into sysBrian Anderson-5/+2
2016-09-30Auto merge of #36339 - brson:emscripten-new, r=alexcrichtonbors-4/+8
Working asmjs and wasm targets This patch set results in a working standard library for the asmjs-unknown-emscripten and wasm32-unknown-emscripten targets. It is based on the work of @badboy and @rschulman. It does a few things: - Updates LLVM with the emscripten [fastcomp](https://github.com/rust-lang/llvm/pull/50) patches, which include the pnacl IR legalizer and the asm.js backend. This patch is thought not to have any significant effect on existing targets. - Teaches rustbuild to correctly link C code with emscripten - Updates gcc-rs to work correctly with emscripten - Teaches rustbuild to run crate tests for emscripten with node - Modifies Thread::new to return an error on emscripten, to facilitate debugging a common failure mode - Modifies libtest to run in single-threaded mode for emscripten - Ignores a host of tests that don't work yet, mostly dealing with threads and I/O - Updates libc with wasm32 definitions (presently the same as asmjs) - Adds a wasm32-unknown-emscripten target that feeds the output of LLVM's asmjs backend through emcc to generate wasm Notes and caveats: - This is only known to work with `--enable-rustbuild`. - The wasm32 target can't be tested correctly yet because of issues in compiletest and limitations in node https://github.com/kripken/emscripten/issues/4542, but hello.rs does seem to work when run on node via the binaryen interpreter - This requires an up to date installation of the emscripten sdk from its incoming branch - Unwinding is very broken - When enabling the emscripten targets jemalloc is disabled for all targets, which results in test failures for the host Next steps are to fix the jemalloc issue, start building the two emscripten targets on the auto builders, then start producing nightlies. https://github.com/rust-lang/rust/issues/36317 tracks work on this. Fixes https://github.com/rust-lang/rust/issues/36515 Fixes https://github.com/rust-lang/rust/issues/36515 Fixes https://github.com/rust-lang/rust/issues/36356
2016-09-30Change the sigs of set_print/set_panic to allow restoring the default objectsBrian Anderson-4/+4
2016-09-30Ignore lots and lots of std tests on emscriptenBrian Anderson-0/+4
2016-09-30Fix BufRead::{read_until, read_line} documentation.Tomasz Miąsko-7/+3
2016-09-27[std::io::Chain] Mark first as done only when reading into non-zero length ↵Tomasz Miąsko-1/+12
buffer. Fixes #36771.
2016-09-21Fix outdated Doc Comment on BufReader::seekChristopher Serr-2/+2
A long time ago non-panicking `unwrap` methods were renamed to `into_inner` in this Pull Request: https://github.com/rust-lang/rust/pull/19149 Looks like this doc comment was not updated however.
2016-09-13Rollup merge of #36397 - SuperFluffy:bufwriter_unnecessary_cmp, r=aturonGuillaume Gomez-2/+1
Remove unnecessary `cmp::min` from BufWriter::write The first branch of the if statement already checks if `buf.len() >= self.buf.capacity()`, which makes the `cmp::min(buf.len(), self.buf.capacity())` redundant: the result will always be `buf.len()`. Therefore, we can pass the `buf` slice directly into `Write::write`.
2016-09-12Auto merge of #36019 - frewsxcv:take-into-inner, r=alexcrichtonbors-0/+27
Introduce `into_inner` method on `std::io::Take`. https://github.com/rust-lang/rust/issues/23755
2016-09-11Remove unnecessary `cmp::min` from BufWriter::writeRichard Janis Goldschmidt-2/+1
The first branch of the if statement already checks if `buf.len() >= self.buf.capacity()`, which makes the `cmp::min(buf.len(), self.buf.capacity())` redundant: the result will always be `buf.len()`. Therefore, we can pass the `buf` slice directly into `Write::write`.
2016-08-31Rollup merge of #35911 - tbu-:pr_io_errorkind_traits, r=alexcrichtonJonathan Turner-2/+3
Implement more traits for `std::io::ErrorKind` This makes it possible to use it as key in various maps.
2016-08-26Introduce `into_inner` method on `std::io::Take`.Corey Farwell-0/+27
https://github.com/rust-lang/rust/issues/23755
2016-08-24Use `#[prelude_import]` in `libstd`.Jeffrey Seyfried-26/+0
2016-08-24Restore old ordering of `io::ErrorKind`sTobias Bucher-3/+4
2016-08-23Implement more traits for `std::io::ErrorKind`Tobias Bucher-6/+6
This makes it possible to use it as key in various maps.
2016-08-18Fix linksNick Cameron-3/+3
2016-07-30Add urls in std::io typesGuillaume Gomez-2/+14
2016-07-30Add io::Take doc exampleGuillaume Gomez-0/+18
2016-07-30Add doc example for StdoutGuillaume Gomez-0/+15
2016-07-30Add doc example for StdinGuillaume Gomez-0/+15