about summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2017-06-13Remove sometimes in std::io::Read docHavvy-1/+1
We use it immediately in the next sentence, and the word is filler.
2017-06-13Rollup merge of #42597 - mark-buer:park_timeout_example_fix, r=alexcrichtonCorey Farwell-5/+9
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.
2017-06-13Ignore some failing test on wasm32-unknown-emscriptenMarco A L Barbosa-0/+3
See #42629 and #42630.
2017-06-12Rollup merge of #42579 - maccoda:maccoda/env_docs, r=steveklabnikCorey Farwell-9/+11
env docs completion. Should be closing #29351 with the alignment of the iterators to the template.
2017-06-12Capture elapsed duration in Thread::park_timeout exampleMark Buer-5/+9
2017-06-10env docs completion.Dylan Maccora-9/+11
2017-06-09Auto merge of #42521 - alexcrichton:enosys, r=cuviperbors-6/+23
std: Handle ENOSYS when calling `pipe2` Should help fix an accidental regression from #39386.
2017-06-08std: Handle ENOSYS when calling `pipe2`Alex Crichton-6/+23
Should help fix an accidental regression from #39386.
2017-06-08Auto merge of #42522 - frewsxcv:rollup, r=frewsxcvbors-1/+61
Rollup of 5 pull requests - Successful merges: #42470, #42490, #42497, #42510, #42512 - Failed merges:
2017-06-07Rollup merge of #42490 - gaurikholkar:master, r=eddybCorey Farwell-1/+1
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
2017-06-07Rollup merge of #42470 - frewsxcv:frewsxcv/ffi-cstr-doc-examples, ↵Corey Farwell-0/+60
r=QuietMisdreavus Add doc examples for `CString` methods. None
2017-06-08Auto merge of #40706 - irfanhudda:doc-next-power-of-two, r=alexcrichtonbors-1/+4
Improve documentation of next_power_of_two Clarify overflow behavior of `next_power_of_two`. Related Issue: #18604
2017-06-06Add conversions from File and Child* handles to StdioJosh Stone-6/+71
`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`.
2017-06-07Changing error message for interior mutability, adding ui testgaurikholkar-1/+1
2017-06-06Auto merge of #42436 - ollie27:win_spawn_name, r=alexcrichtonbors-8/+10
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.
2017-06-05Add doc example for `CString::as_bytes`.Corey Farwell-0/+10
2017-06-05Add doc example for `CString::as_bytes_with_nul`.Corey Farwell-0/+10
2017-06-05Add doc example for `CString::into_bytes_with_nul`.Corey Farwell-0/+10
2017-06-05Add doc example for `CString::into_bytes`.Corey Farwell-0/+10
2017-06-05Add doc example for `CString::into_raw`.Corey Farwell-0/+20
2017-06-05[fuchsia] Track change of mx_job_defaultRaph Levien-5/+1
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.
2017-06-04Auto merge of #42426 - arthurprs:io_error, r=sfacklerbors-0/+1
Inline io::Error creation from ErrorKind Faster and smaller code for mio and tokio (PRs on those to follow)
2017-06-04Always quote program name in Command::spawn on WindowsOliver Middleton-8/+10
`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.
2017-06-04inline io::Error creation from ErrorKindarthurprs-0/+1
2017-06-04Merge branch 'profiling' of github.com:whitequark/rust into profilingMarco Castelluccio-0/+2
2017-06-02Implement Sync for SyncSenderSteven Fackler-5/+0
2017-06-02Switch to repr(C) for syscall structsJeremy Soller-3/+3
2017-06-02Rollup merge of #42372 - frewsxcv:frewsxcv/improve-receiver-docs, ↵Mark Simulacrum-14/+21
r=QuietMisdreavus Rewrite a couple `Receiver` doc examples. None
2017-06-02Rollup merge of #42225 - brson:vs2017, r=alexcrichtonMark Simulacrum-1/+1
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
2017-06-02Rollup merge of #41981 - gamazeps:thread-detach, r=frewsxcvMark Simulacrum-3/+28
[Doc] Expands `detach` documentation in `thread::JoinHande`. Part of #29378 . - Adds an example of a thread detaching. - Expands what `detaching` means. r? @steveklabnik
2017-06-02Expands `detach` documentation in `thread::JoinHande`.Felix Raimundo-3/+28
Part of #29378 . - Adds an example of a thread detaching. - Expands what `detaching` means.
2017-06-02Rewrite `Receiver::try_iter` doc example to show resulting values.Corey Farwell-8/+13
2017-06-02Rewrite `Receiver::iter` doc example to show resulting values.Corey Farwell-6/+8
2017-06-01Support VS 2017Brian Anderson-1/+1
Fixes #38584
2017-06-01Auto merge of #42281 - eddyb:well-adjusted, r=nikomatsakisbors-10/+10
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
2017-06-01tests: fix fallout from empowering unused_allocation in comparisons.Eduard-Mihai Burtescu-10/+10
2017-05-31Rewrite doc examples for `Receiver::recv_timeout`.Corey Farwell-4/+33
2017-05-31Simplify helper functionsIrfan Hudda-1/+4
Based on @scottmcm 's suggestion
2017-05-26doc rewordingking6cong-1/+1
2017-05-24Rollup merge of #42198 - GuillaumeGomez:os-str-doc, r=QuietMisdreavusMark Simulacrum-3/+9
Add missing urls for OsStr docs r? @rust-lang/docs
2017-05-24Rollup merge of #42149 - dvyukov:license, r=brsonMark Simulacrum-54/+20
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
2017-05-24Rollup merge of #42142 - ids1024:redox, r=aturonMark Simulacrum-0/+5
Implement requires_synchronized_create() for Redox This was breaking the libstd build for Redox.
2017-05-24Rollup merge of #42141 - ids1024:nobacktrace, r=aturonMark Simulacrum-0/+8
Fix building std without backtrace feature, which was broken in ca8b754 Fixes #42139
2017-05-24Rollup merge of #41980 - gamazeps:thread-send, r=steveklabnikMark Simulacrum-0/+22
[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
2017-05-24Add missing urls for OsStr docsGuillaume Gomez-3/+9
2017-05-22Add missing links for CStr and CStringGuillaume Gomez-30/+74
2017-05-22libstd/sync/mpsc: relicense under rust licenseDmitry Vyukov-54/+20
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
2017-05-21Auto merge of #41904 - sfackler:1.18-stabilization, r=alexcrichtonbors-43/+26
Stabilize library features for 1.18.0 Closes #38863 Closes #38980 Closes #38903 Closes #36648 r? @alexcrichton @rust-lang/libs
2017-05-21Implement requires_synchronized_create() for RedoxIan Douglas Scott-0/+5
This was breaking the libstd build for Redox.
2017-05-21Fix building without backtrace feature, which was broken in ca8b754Ian Douglas Scott-0/+8
Fixes #42139