| Age | Commit message (Collapse) | Author | Lines |
|
We use it immediately in the next sentence, and the word is filler.
|
|
Capture elapsed duration in Thread::park_timeout example
`beginning_park.elapsed()` might return a larger value within the loop as compared to that checked in the loop conditional.
Since `Duration` arithmetic is checked, hitting such an edge case will cause a panic.
|
|
See #42629 and #42630.
|
|
env docs completion.
Should be closing #29351 with the alignment of the iterators to the template.
|
|
|
|
|
|
std: Handle ENOSYS when calling `pipe2`
Should help fix an accidental regression from #39386.
|
|
Should help fix an accidental regression from #39386.
|
|
Rollup of 5 pull requests
- Successful merges: #42470, #42490, #42497, #42510, #42512
- Failed merges:
|
|
Changing error message from `contains interior mutability` to `may contain interior mutability`
Fixes #40313 . I have changed the message from `contains interior mutability` to `may contain interior mutability` for the following example
```
use std::cell::Cell;
use std::panic::catch_unwind;
fn main() {
let mut x = Cell::new(22);
catch_unwind(|| { x.set(23); });
}
```
which has been added as a ui test.
Also, the message [here](https://github.com/gaurikholkar/rust/blob/master/src/librustc_mir/transform/qualify_consts.rs#L666) and it's respective `compile-fail` test have been modified.
cc @nikomatsakis @Mark-Simulacrum @eddyb
|
|
r=QuietMisdreavus
Add doc examples for `CString` methods.
None
|
|
Improve documentation of next_power_of_two
Clarify overflow behavior of `next_power_of_two`.
Related Issue: #18604
|
|
`Stdio` now implements `From<ChildStdin>`, `From<ChildStdout>`,
`From<ChildStderr>`, and `From<File>`.
The `Command::stdin`/`stdout`/`stderr` methods now take any type that
implements `Into<Stdio>`.
This makes it much easier to write shell-like command chains, piping to
one another and redirecting to and from files. Otherwise one would need
to use the unsafe and OS-specific `from_raw_fd` or `from_raw_handle`.
|
|
|
|
Always quote program name in Command::spawn on Windows
[`CreateProcess`](https://msdn.microsoft.com/en-us/library/windows/desktop/ms682425.aspx) will interpret args as part of the binary name if it
doesn't find the binary using just the unquoted name. For example if
`foo.exe` doesn't exist, `Command::new("foo").arg("bar").spawn()` will
try to launch `foo bar.exe` which is clearly not desired.
|
|
|
|
|
|
|
|
|
|
|
|
The implementation of mx_job_default changed from a macro which
accessed the __magenta_job_default global variable to a proper
function call. This patch tracks that change.
|
|
Inline io::Error creation from ErrorKind
Faster and smaller code for mio and tokio (PRs on those to follow)
|
|
`CreateProcess` will interpret args as part of the binary name if it
doesn't find the binary using just the unquoted name. For example if
`foo.exe` doesn't exist, `Command::new("foo").arg("bar").spawn()` will
try to launch `foo bar.exe` which is clearly not desired.
|
|
|
|
|
|
|
|
|
|
r=QuietMisdreavus
Rewrite a couple `Receiver` doc examples.
None
|
|
Support VS 2017
Fixes #38584
This replaces all the MSVC linker logic with that from the 'gcc' crate. The code looks the same, but there could be regressions.
I've only tested this with x86_64.
r? @alexcrichton
cc @vadimcn @retep998
|
|
[Doc] Expands `detach` documentation in `thread::JoinHande`.
Part of #29378 .
- Adds an example of a thread detaching.
- Expands what `detaching` means.
r? @steveklabnik
|
|
Part of #29378 .
- Adds an example of a thread detaching.
- Expands what `detaching` means.
|
|
|
|
|
|
Fixes #38584
|
|
Decompose Adjustment into smaller steps and remove the method map.
The method map held method callee information for:
* actual method calls (`x.f(...)`)
* overloaded unary, binary, indexing and call operators
* *every overloaded deref adjustment* (many can exist for each expression)
That last one was a historical ~~accident~~ hack, and part of the motivation for this PR, along with:
* a desire to compose adjustments more freely
* containing the autoderef logic better to avoid mutation within an inference snapshot
* not creating `TyFnDef` types which are incompatible with the original one
* i.e. we used to take a`TyFnDef`'s `for<'a> &'a T -> &'a U` signature and instantiate `'a` using a region inference variable, *then* package the resulting `&'b T -> &'b U` signature in another `TyFnDef`, while keeping *the same* `DefId` and `Substs`
* to fix #3548 by explicitly writing autorefs for the RHS of comparison operators
Individual commits tell their own story, of "atomic" changes avoiding breaking semantics.
Future work based on this PR could include:
* removing the signature from `TyFnDef`, now that it's always "canonical"
* some questions of variance remain, as subtyping *still* treats the signature differently
* moving part of the typeck logic for methods, autoderef and coercion into `rustc::traits`
* allowing LUB coercions (joining multiple expressions) to "stack up" many adjustments
* transitive coercions (e.g. reify or unsize after multiple steps of autoderef)
r? @nikomatsakis
|
|
|
|
|
|
Based on @scottmcm 's suggestion
|
|
|
|
Add missing urls for OsStr docs
r? @rust-lang/docs
|
|
libstd/sync/mpsc: relicense under rust license
These files are licensed under a different license
than the rest of the codebase. This causes potential
issues and inconveniences.
Relicense these files under the standard license.
I hold original copyright on that code.
Fixes #36556
|
|
Implement requires_synchronized_create() for Redox
This was breaking the libstd build for Redox.
|
|
Fix building std without backtrace feature, which was broken in ca8b754
Fixes #42139
|
|
[Doc] Add `'static` and `Send` constraints explanations to `thread::spawn`
Part of #29378.
Explains why the constraints on the closure and its return value are `'static` and `Send`.
Allows to tick of `thread::spawn` from the list of things to document in the `thread` module.
r? @steveklabnik
|
|
|
|
|
|
These files are licensed under a different license
than the rest of the codebase. This causes potential
issues and inconveniences.
Relicense these files under the standard license.
I hold original copyright on that code.
Fixes #36556
|
|
Stabilize library features for 1.18.0
Closes #38863
Closes #38980
Closes #38903
Closes #36648
r? @alexcrichton
@rust-lang/libs
|
|
This was breaking the libstd build for Redox.
|
|
Fixes #42139
|