- 15 5月, 2014 21 次提交
-
-
由 Aaron Turon 提交于
The existing APIs for spawning processes took strings for the command and arguments, but the underlying system may not impose utf8 encoding, so this is overly limiting. The assumption we actually want to make is just that the command and arguments are viewable as [u8] slices with no interior NULLs, i.e., as CStrings. The ToCStr trait is a handy bound for types that meet this requirement (such as &str and Path). However, since the commands and arguments are often a mixture of strings and paths, it would be inconvenient to take a slice with a single T: ToCStr bound. So this patch revamps the process creation API to instead use a builder-style interface, called `Command`, allowing arguments to be added one at a time with differing ToCStr implementations for each. The initial cut of the builder API has some drawbacks that can be addressed once issue #13851 (libstd as a facade) is closed. These are detailed as FIXMEs. Closes #11650. [breaking-change]
-
由 Aaron Turon 提交于
This is a stopgap until DST (#12938) lands. Until DST lands, we cannot decompose &str into & and str, so we cannot usefully take ToCStr arguments by reference (without forcing an additional & around &str). So we are instead temporarily adding an instance for &Path and StrBuf, so that we can take ToCStr as owned. When DST lands, the &Path instance should be removed, the string instances should be revisted, and arguments bound by ToCStr should be passed by reference. FIXMEs have been added accordingly.
-
由 Patrick Walton 提交于
-
由 Patrick Walton 提交于
-
由 Patrick Walton 提交于
-
由 Patrick Walton 提交于
-
由 Patrick Walton 提交于
-
由 Patrick Walton 提交于
-
由 Patrick Walton 提交于
-
由 Patrick Walton 提交于
-
由 Patrick Walton 提交于
-
由 Patrick Walton 提交于
-
由 Patrick Walton 提交于
-
由 Patrick Walton 提交于
-
由 Patrick Walton 提交于
-
由 Patrick Walton 提交于
-
由 Patrick Walton 提交于
-
由 Patrick Walton 提交于
-
由 Patrick Walton 提交于
-
由 Patrick Walton 提交于
-
由 Kevin Butler 提交于
-
- 14 5月, 2014 19 次提交
-
-
由 J.C. Moyer 提交于
-
由 Alex Crichton 提交于
Due to our excellent macro hygiene, this involves having a global path and a hidden module in libcore itself.
-
由 Alex Crichton 提交于
Explain why it should not exist, and the plan of attack for removing it.
-
由 Alex Crichton 提交于
-
由 Alex Crichton 提交于
-
由 Michael Darakananda 提交于
-
由 Luqman Aden 提交于
-
由 Luqman Aden 提交于
There's no need to include this specific flag just for android. We can already deal with what it tries to solve by using -C linker=/path/to/cc and -C ar=/path/to/ar. The Makefiles for rustc already set this up when we're crosscompiling. I did add the flag to compiletest though so it can find gdb. Though, I'm pretty sure we don't run debuginfo tests on android anyways right now. [breaking-change]
-
由 Kevin Ballard 提交于
Reader.read_at_least() ensures that at least a given number of bytes have been read. The most common use-case for this is ensuring at least 1 byte has been read. If the reader returns 0 enough times in a row, a new error kind NoProgress will be returned instead of looping infinitely. This change is necessary in order to properly support Readers that repeatedly return 0, either because they're broken, or because they're attempting to do a non-blocking read on some resource that never becomes available. Also add .push() and .push_at_least() methods. push() is like read() but the results are appended to the passed Vec. Remove Reader.fill() and Reader.push_exact() as they end up being thin wrappers around read_at_least() and push_at_least(). [breaking-change]
-
由 Alex Crichton 提交于
This implements set_timeout() for std::io::Process which will affect wait() operations on the process. This follows the same pattern as the rest of the timeouts emerging in std::io::net. The implementation was super easy for everything except libnative on unix (backwards from usual!), which required a good bit of signal handling. There's a doc comment explaining the strategy in libnative. Internally, this also required refactoring the "helper thread" implementation used by libnative to allow for an extra helper thread (not just the timer). This is a breaking change in terms of the io::Process API. It is now possible for wait() to fail, and subsequently wait_with_output(). These two functions now return IoResult<T> due to the fact that they can time out. Additionally, the wait_with_output() function has moved from taking `&mut self` to taking `self`. If a timeout occurs while waiting with output, the semantics are undesirable in almost all cases if attempting to re-wait on the process. Equivalent functionality can still be achieved by dealing with the output handles manually. [breaking-change] cc #13523
-
由 klutzy 提交于
LLVM internally uses `uint64_t` for array size, but the corresponding C API (`LLVMArrayType`) uses `unsigned int` so ths value is truncated. Therefore rustc generates wrong type for fixed-sized large vector e.g. `[0 x i8]` for `[0u8, ..(1 << 32)]`. This patch adds `LLVMRustArrayType` function for `uint64_t` support.
-
由 Alex Crichton 提交于
When printing doc comments, always put a newline after them in a macro invocation to ensure that a line-doc-comment doesn't consume remaining tokens on the line.
-
由 Alex Crichton 提交于
Now that the #[deriving] attribute is removed, the raw_pointers_deriving lint was broken. This commit restores the lint by preserving lint attributes across #[deriving] to the implementations and using #[automatically_derived] as the trigger for activating the lint.
-
由 Alex Crichton 提交于
-
由 Alex Crichton 提交于
Previously, literals "1i" were printed as "1". This fixes the numeric-method-autoexport test for pretty printing.
-
由 Alex Crichton 提交于
When expanding, an extra unsafe block is generated which is currently not handled well.
-
由 Alex Crichton 提交于
The pretty printer handles inlines comments quite badly
-
由 Alex Crichton 提交于
This uses the trick of replacing the << token with a < token to parse closure types correctly. Closes #13324
-
由 Alex Crichton 提交于
Integers are always parsed as a u64 in libsyntax, but they're stored as i64. The parser and pretty printer both printed an i64 instead of u64, sometimes introducing an extra negative sign.
-