about summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
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-01Remove recommendation for unmaintained crateJacob Kiesel-1/+1
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-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-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.
2020-04-22Rollup merge of #71366 - faern:use-assoc-int-consts3, r=dtolnayYuki Okushi-12/+12
Use assoc int consts3 Define module level int consts with associated constants instead of `min_value()` and `max_value()`. So the code become consistent with what the docs recommend etc. Seems natural. Also remove the last usages of the int module constants from this repo (except src/test/ directory which I have still not really done anything in). Some places were missed in the previous PRs because the code uses `crate::<IntTy>` to reach the constants. This is a continuation of #70857 r? @dtolnay
2020-04-20Use assoc float consts instead of module levelLinus Färnstrand-11/+11
2020-04-20Stop accessing module level int consts via crate::<Ty>Linus Färnstrand-1/+1
2020-04-20Rollup merge of #71328 - Mark-Simulacrum:stabilize-pathbuf-capacity, r=sfacklerDylan DPC-8/+7
Stabilize PathBuf capacity methods Closes https://github.com/rust-lang/rust/issues/58234. Stabilization FCP finished in https://github.com/rust-lang/rust/issues/58234#issuecomment-616048777.
2020-04-20Auto merge of #71007 - Amanieu:deprecate_asm, r=Mark-Simulacrumbors-0/+2
Deprecate the asm! macro in favor of llvm_asm! Since we will be changing the syntax of `asm!` soon, deprecate it and encourage people to use `llvm_asm!` instead (which preserves the old syntax). This will avoid breakage when `asm!` is changed. RFC: https://github.com/rust-lang/rfcs/pull/2843
2020-04-19Stabilize PathBuf capacity methodsMark Rousskov-8/+7
2020-04-18Change wording on read_vectored docsNathan Abel-2/+3
2020-04-17Rollup merge of #71167 - RalfJung:big-o, r=shepmasterDylan DPC-6/+6
big-O notation: parenthesis for function calls, explicit multiplication I saw `O(n m log n)` in the docs and found that really hard to parse. In particular, I don't think we should use blank space as syntax for *both* multiplication and function calls, that is just confusing. This PR makes both multiplication and function calls explicit using Rust-like syntax. If you prefer, I can also leave one of them implicit, but I believe explicit is better here. While I was at it I also added backticks consistently.
2020-04-17Fix unused results from mem::replaceJosh Stone-1/+1
2020-04-16Dogfood or_patterns in the standard libraryJosh Stone-2/+3
2020-04-15Deprecate the asm! macroAmanieu d'Antras-0/+2
2020-04-15big-O notation: parenthesis, multiplication and backticksRalf Jung-6/+6
2020-04-15Use fcntl() to set nonblock for solarish socketsPatrick Mooney-0/+8
The ioctl(FIONBIO) method of setting a file descriptor to be non-blocking does not notify the underlying resource in the same way that fcntl(F_SETFL, O_NONBLOCK) does on illumos and Solaris.