summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2020-05-12Stabilize process_set_argv0 feature for UnixJeremy Fitzhardinge-2/+2
This stabilizes process_set_argv0 targeting 1.45.0. It has been useful in practice and seems useful as-is. The equivalent feature could be implemented for Windows, but as far as I know nobody has. That can be done separately. Tracking issue: #66510
2020-05-12Warn against thread::sleep in async fnKornel-0/+4
2020-05-11Fix clippy warningsMatthias Krüger-1/+1
Fixes clippy::{cone_on_copy, filter_next, redundant_closure, single_char_pattern, len_zero,redundant_field_names, useless_format, identity_conversion, map_clone, into_iter_on_ref, needless_return, option_as_ref_deref, unused_unit, unnecessary_mut_passed}
2020-05-09Better documentation for io::Read::read() return valueElinvynia-0/+5
2020-05-07Rollup merge of #71980 - steveklabnik:warnings-fixes, r=Mark-SimulacrumDylan DPC-0/+6
Allow a few warnings. On Windows, these types were causing warnings to be emitted during the build. These types are allowed to not have idiomatic names, so the warning should be supressed.
2020-05-07Allow a few warnings.Steve Klabnik-0/+6
On Windows, these types were causing warnings to be emitted during the build. These types are allowed to not have idiomatic names, so the warning should be supressed.
2020-05-06Rollup merge of #71591 - hermitcore:thread_create, r=hanna-kruppeDylan DPC-8/+7
use new interface to create threads on HermitCore - the new interface allows to define the stack size - increase the default stack size to 1 MByte
2020-05-06Rollup merge of #71921 - RalfJung:open-mode, r=hanna-kruppeDylan DPC-0/+4
explain the types used in the open64 call Fixes https://github.com/rust-lang/rust/issues/71915, where I learned about this quirk. I don't actually know what I am talking about here. ;)
2020-05-05explain the types used in the open64 callRalf Jung-0/+4
2020-05-05rely on rdlock/wrlock not returning anything but the specified error codesRalf Jung-2/+6
2020-05-04edit Mutex commentRalf Jung-4/+6
2020-05-04explain our rwlock implementation (and fix a potential data race)Ralf Jung-20/+24
2020-05-04expand comment on default mutex behaviorRalf Jung-3/+7
2020-05-03Rollup merge of #71398 - ThinkChaos:feat_refcell_take, r=LukasKalbertodtDylan DPC-1/+1
Add `RefCell::take` Add `RefCell::take` to match `Cell` and `Option`. I also changed a couple of calls to `.replace` to `.take`. Tracking issue is #71395. This is my first contribution, please tell me if there's anything I could improve, thanks!
2020-05-02Rollup merge of #71785 - reitermarkus:cfg-attribute, r=Mark-SimulacrumDylan DPC-7/+9
Update comment regarding SO_REUSEADDR on Windows
2020-05-02Replace `cfg` macro with attribute.Markus Reiter-7/+9
2020-05-02fix formatting issues that fail tidy testCarsten Andrich-16/+16
2020-05-02use or pattern to match error codes that map to ErrorKind::TimedOutCarsten Andrich-15/+15
2020-05-01Remove recommendation for unmaintained crateJacob Kiesel-1/+1
2020-05-01add Windows system error codes that map to io::ErrorKind::TimedOutCarsten Andrich-2/+35
2020-04-29Add explicit references to the BuildHasher traitMark Rousskov-0/+20
2020-04-29Rollup merge of #71296 - ChiefMilesEdgeworth:fix_doc_wording, r=Dylan-DPCDylan DPC-2/+3
Change wording on read_vectored docs Closes #70154 I'm happy to work with others to make the wording on this more clear. I think what I have is an improvement but may not be the final wording.
2020-04-29Implement FromStr for OsStringMike Hommey-0/+10
2020-04-28Impl Error for InfallibleBenoît du Garreau-1/+2
2020-04-27Rollup merge of #67841 - sfackler:can-vector, r=AmaneiuDylan DPC-0/+565
Add Read/Write::can_read/write_vectored When working with an arbitrary reader or writer, code that uses vectored operations may end up being slower than code that copies into a single buffer when the underlying reader or writer doesn't actually support vectored operations. These new methods allow you to ask the reader or witer up front if vectored operations are efficiently supported. Currently, you have to use some heuristics to guess by e.g. checking if the read or write only accessed the first buffer. Hyper is one concrete example of a library that has to do this dynamically: https://github.com/hyperium/hyper/blob/0eaf304644a396895a4ce1f0146e596640bb666a/src/proto/h1/io.rs#L582-L594
2020-04-27fix wasiSteven Fackler-2/+2
2020-04-27use nicer code style to define DEFAULT_MIN_STACK_SIZEStefan Lankes-1/+1
2020-04-26fix wasm buildSteven Fackler-0/+8
2020-04-26use new interface to create threads on HermitCoreStefan Lankes-8/+7
- the new interface allows to define the stack size
2020-04-26Suppress file length check temporarilySteven Fackler-0/+1
Will clean up in a separate PR
2020-04-26Fix stragglersSteven Fackler-9/+9
2020-04-26Update nameSteven Fackler-158/+158
2020-04-26Add Read/Write::can_read/write_vectoredSteven Fackler-0/+556
When working with an arbitrary reader or writer, code that uses vectored operations may end up being slower than code that copies into a single buffer when the underlying reader or writer doesn't actually support vectored operations. These new methods allow you to ask the reader or witer up front if vectored operations are efficiently supported. Currently, you have to use some heuristics to guess by e.g. checking if the read or write only accessed the first buffer. Hyper is one concrete example of a library that has to do this dynamically: https://github.com/hyperium/hyper/blob/0eaf304644a396895a4ce1f0146e596640bb666a/src/proto/h1/io.rs#L582-L594
2020-04-26Use Cell::take in a couple placesThinkChaos-1/+1
2020-04-26fix more clippy warningsMatthias Krüger-1/+1
clippy::{redundant_pattern_matching, clone_on_copy, iter_cloned_collect, option_as_ref_deref, match_ref_pats}
2020-04-25Auto merge of #71556 - Dylan-DPC:rollup-9ll4shr, r=Dylan-DPCbors-11/+6
Rollup of 7 pull requests Successful merges: - #69041 (proc_macro: Stabilize `Span::resolved_at` and `Span::located_at`) - #69813 (Implement BitOr and BitOrAssign for the NonZero integer types) - #70712 (stabilize BTreeMap::remove_entry) - #71168 (Deprecate `{Box,Rc,Arc}::into_raw_non_null`) - #71544 (Replace filter_map().next() calls with find_map()) - #71545 (Fix comment in docstring example for Error::kind) - #71548 (Add missing Send and Sync impls for linked list Cursor and CursorMut.) Failed merges: r? @ghost
2020-04-25Rollup merge of #71545 - Askaholic:patch-1, r=jonas-schievinkDylan DPC-2/+2
Fix comment in docstring example for Error::kind Saw it while reading the docs.
2020-04-25Rollup merge of #71544 - cuviper:filter_map_next, r=Mark-SimulacrumDylan DPC-9/+4
Replace filter_map().next() calls with find_map() These are semantically the same, but `find_map()` is more concise.
2020-04-25Auto merge of #71439 - Mark-Simulacrum:stage0-next, r=jonas-schievinkbors-154/+24
Bump bootstrap compiler This bumps the bootstrap compiler and the rustfmt that x.py fmt uses.
2020-04-25Bump rustfmt to most recently shippedMark Rousskov-7/+19
2020-04-25Bump bootstrap compilerMark Rousskov-147/+5
2020-04-25Fix comment in docstring example for Error::kindAskaholic-2/+2
2020-04-24Replace filter_map().next() calls with find_map()Josh Stone-9/+4
These are semantically the same, but `find_map()` is more concise.
2020-04-25Rollup merge of #71535 - workingjubilee:jubilee-markdown-fix, r=Mark-SimulacrumDylan DPC-2/+2
Fix typos in docs for keyword "in" Erroneous .md formatting was causing the link to not work on the currently-nightly keyword docs for `in`, and also there was a simple typo.
2020-04-24Fix typos in docs for keyword "in"Jubilee Young-2/+2
2020-04-24Avoid unused Option::map resultsJosh Stone-5/+11
These are changes that would be needed if we add `#[must_use]` to `Option::map`, per #71484.
2020-04-22Rollup merge of #71256 - cuviper:must_use_replace, r=estebankDylan DPC-1/+1
Lint must_use on mem::replace This adds a hint on `mem::replace`, "if you don't need the old value, you can just assign the new value directly". This is in similar spirit to the `must_use` on `ManuallyDrop::take`.
2020-04-22impl From<Cow> for boxed slices and stringsJosh Stone-0/+33
These forward `Borrowed`/`Owned` values to existing `Box::from` impls. - `From<Cow<'_, [T]>> for Box<[T]>` - `From<Cow<'_, str>> for Box<str>` - `From<Cow<'_, CStr>> for Box<CStr>` - `From<Cow<'_, OsStr>> for Box<OsStr>` - `From<Cow<'_, Path>> for Box<Path>`
2020-04-22Rollup merge of #71414 - phansch:more-diagnostic-items, r=ManishearthDylan DPC-0/+3
More diagnostic items for Clippy usage This adds a couple of more diagnostic items to be used in Clippy. I chose these particular ones because they were the types which we seem to check for the most in Clippy. I'm not sure if the `cfg_attr(not(test))` is needed, but it was also used for `Vec` and a few other types. cc https://github.com/rust-lang/rust-clippy/issues/5393 r? @Manishearth
2020-04-22More diagnostic items for Clippy usagePhilipp Hansch-0/+3
This adds a couple of more diagnostic items to be used in Clippy. I chose these particular ones because they were the types which we seem to check for the most in Clippy. I'm not sure if the `cfg_attr(not(test))` is needed, but it was also used for `Vec` and a few other types.