| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
|
|
|
|
Otherwise the optimizer can't be sure that pos <= cap. Added a paranoid debug_assert to ensure correctness instead.
|
|
Add missing urls on io structs
r? @steveklabnik
|
|
Add missing urls for ErrorKind's variants
r? @steveklabnik
|
|
|
|
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.
|
|
|
|
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
|
|
Implement From<ErrorKind> for io::Error, intended for use with errors
that should never be exposed to the user.
|
|
|
|
Fix a few links in the docs
r? @steveklabnik
|
|
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.
|
|
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.
|
|
|
|
Add missing urls for io types
r? @steveklabnik
|
|
|
|
add missing urls for BufWriter and BufReader
r? @steveklabnik
|
|
|
|
Add missing urls in io module
r? @steveklabnik
|
|
|
|
[tracking issue](https://github.com/rust-lang/rust/issues/27749)
|
|
|
|
`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.
|
|
Check for overflow in Cursor<Vec<u8>>::write.
Ensure that cursor position fits into usize, before proceeding with
write. Fixes issue #36884.
|
|
Update unstable attr to reference tracking issue.
|
|
Ensure that cursor position fits into usize, before proceeding with
write. Fixes issue #36884.
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
buffer.
Fixes #36771.
|
|
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.
|
|
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`.
|
|
Introduce `into_inner` method on `std::io::Take`.
https://github.com/rust-lang/rust/issues/23755
|
|
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`.
|
|
Implement more traits for `std::io::ErrorKind`
This makes it possible to use it as key in various maps.
|
|
https://github.com/rust-lang/rust/issues/23755
|
|
|
|
|
|
This makes it possible to use it as key in various maps.
|
|
|
|
|
|
|
|
|
|
|