| Age | Commit message (Collapse) | Author | Lines |
|
Printing is an incredibly useful debugging utility, and it's not much help if
your debugging prints just trigger an obscure abort when you need them most. In
order to handle this case, forcibly fall back to a libc::write implementation of
printing whenever a local task is not available.
Note that this is *not* a 1:1 fallback. All 1:1 rust tasks will still have a
local Task that it can go through (and stdio will be created through the local
IO factory), this is only a fallback for "no context" rust code (such as that
setting up the context).
|
|
It is not the case that all programs will always be able to acquire an instance
of the LocalIo borrow, so this commit exposes this limitation by returning
Option<LocalIo> from LocalIo::borrow().
At the same time, a helper method LocalIo::maybe_raise() has been added in order
to encapsulate the functionality of raising on io_error if there is on local I/O
available.
|
|
This module contains many M:N specific concepts. This will no longer be
available with libgreen, and most functions aren't really that necessary today
anyway. New testing primitives will be introduced as they become available for
1:1 and M:N.
A new io::test module is introduced with the new ip4/ip6 address helpers to
continue usage in io tests.
|
|
Could prevent callers from catching the situation and lead to e.g early
iterator terminations (cf. `Reader::read_byte`) since `None` is only to
be returned only on EOF.
|
|
|
|
|
|
The two `Some(0)' used to be `None' before the patch, a zero-byte long
read exhausting a reader (and thereafter) still produce a `None'.
|
|
Thanks to @huonw for some mentoring. :cake:
|
|
|
|
I accidentally removed this module from compilation awhile back, this adds it
back in.
Closes #11076
|
|
I accidentally removed this module from compilation awhile back, this adds it
back in.
Closes #11076
|
|
|
|
There's no need for the restrictions of a closure with the above methods.
|
|
Translate ENOENT to IoErrorKind::FileNotFound.
|
|
Translate ENOENT to IoErrorKind::FileNotFound.
|
|
|
|
|
|
Could prevent callers from catching the situation and lead to e.g early
iterator terminations (cf. `Reader::read_byte') since `None' is only to
be returned only on EOF.
|
|
See commits for details.
|
|
|
|
|
|
raw}::copy_memory.
Slices carry their length with them, so we can just use that
information.
|
|
|
|
This adds a bunch of useful Reader and Writer implementations. I'm not a
huge fan of the name `util` but I can't think of a better name and I
don't want to make `std::io` any longer than it already is.
|
|
This adds a bunch of useful Reader and Writer implementations. I'm not a
huge fan of the name `util` but I can't think of a better name and I
don't want to make `std::io` any longer than it already is.
|
|
Also remove all instances of 'self within the codebase.
This fixes #10889.
|
|
- `Buffer.lines()` returns `LineIterator` which yields line using
`.read_line()`.
- `Reader.bytes()` now takes `&mut self` instead of `self`.
- `Reader.read_until()` swallows `EndOfFile`. This also affects
`.read_line()`.
|
|
|
|
|
|
cells.
|
|
34 uses of `Cell` remain.
|
|
|
|
|
|
Rename the `*::init()` functions back to `*::new()`, since `new` is not
going to become a keyword.
|
|
This reverts commit c54427ddfbbab41a39d14f2b1dc4f080cbc2d41b.
Leave the #[ignores] in that were added to rustpkg tests.
Conflicts:
src/librustc/driver/driver.rs
src/librustc/metadata/creader.rs
|
|
This is just an implementation detail of using libuv, so move the libuv-specific
logic into librustuv.
|
|
This is just an implementation detail of using libuv, so move the libuv-specific
logic into librustuv.
|
|
|
|
This function had type &[u8] -> ~str, i.e. it allocates a string
internally, even though the non-allocating version that take &[u8] ->
&str and ~[u8] -> ~str are all that is necessary in most circumstances.
|
|
It's a more fitting name for the most common use case of this function.
|
|
BufferedWriter::inner flushes before returning the underlying writer.
BufferedWriter::write no longer flushes the underlying writer.
LineBufferedWriter::write flushes up to the *last* newline in the input
string, not the first.
|
|
BufferedWriter::inner flushes before returning the underlying writer.
BufferedWriter::write no longer flushes the underlying writer.
LineBufferedWriter::write flushes up to the *last* newline in the input
string, not the first.
|
|
This allows one to reduce the number of reallocs of the internal buffer
if one has an approximate idea of the size of the final output.
|
|
|
|
|
|
|
|
|
|
compile-fail tests, run-fail tests, and run-pass tests.
|
|
|
|
|