about summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2018-07-01Rollup merge of #51853 - MajorBreakfast:fix-doc-links, r=cramertjPietro Albini-0/+1
Fix some doc links The futures crate CI always fails because of these intra doc links. I hope that this will fix this issue. r? @steveklabnik @cramertj Edit: I added @steveklabnik as reviewer because this PR also adjusts a link in `src/libstd/error.rs`
2018-06-30Auto merge of #51717 - Mark-Simulacrum:snap, r=alexcrichtonbors-72/+33
Bootstrap from 1.28.0 beta
2018-06-30Bootstrap from 1.28.0-beta.3Mark Simulacrum-72/+33
2018-06-30Auto merge of #51178 - GabrielMajeri:os-str-compare, r=SimonSapinbors-0/+14
Implement PartialEq between &str and OsString This fixes #49854. It allows equality comparison between `OsString` values and `str` references, such as `os_string == "something"`.
2018-06-29Use in-tree libbacktrace on FuchsiaTaylor Cramer-5/+0
2018-06-29Rename alloc::arc to alloc::sync, to match std::syncSimon Sapin-1/+1
2018-06-29Move core::alloc::CollectionAllocErr to alloc::collectionsSimon Sapin-3/+4
2018-06-29Move some alloc crate top-level items to a new alloc::collections moduleSimon Sapin-4/+4
This matches std::collections
2018-06-29Fix stability attributesGabriel Majeri-2/+2
2018-06-29Implement PartialEq between &str and OsStringGabriel Majeri-0/+14
Allows for example `os_string == "something"`
2018-06-29Auto merge of #50526 - moxian:just-fix, r=alexcrichtonbors-101/+398
Add a fallback for stacktrace printing for older Windows versions. Some time ago we switched stack inspection functions of dbghelp.dll to their newer alternatives that also capture inlined context. Unfortunately, said new alternatives are not present in older dbghelp.dll versions. In particular Windows 7 at the time of writing has dbghelp.dll version 6.1.7601 from 2010, that lacks StackWalkEx and friends. Tested on my Windows 7 - both msvc and gnu versions produce a readable stacktrace. Fixes #50138
2018-06-29Auto merge of #51290 - Pslydhh:master, r=alexcrichtonbors-2/+8
park/park_timeout: prohibit spurious wakeups in next park <pre><code> // The implementation currently uses the trivial strategy of a Mutex+Condvar // with wakeup flag, which does not actually allow spurious wakeups. </pre></code> Because does not actually allow spurious wakeups. so we have let thread.inner.cvar.wait(m) in the loop to prohibit spurious wakeups. but if notified after we locked, this notification doesn't be consumed, it return, the next park will consume this notification...this is also 'spurious wakeup' case, 'one unpark() wakeups two park()'. We should improve this situation: `thread.inner.state.store(EMPTY, SeqCst);`
2018-06-29Fix inconsequential typo in GlobalAlloc doc exampleIxrec-1/+1
2018-06-28Change traits to bare FnMut where possible.moxian-111/+67
2018-06-28Make msvc symbol extraction/printing functions generic.moxian-103/+137
2018-06-28Make stackwalking generic instead of matching on enum variants.moxian-133/+147
2018-06-28Load backtrace-related functions only oncemoxian-41/+77
.. and pass them around in BacktraceContext.
2018-06-28Split separate stackwalk variants into their own functionsmoxian-204/+238
.. rather than having them be one giant match statement.
2018-06-28Add a fallback for stacktrace printing for older Windows versions.moxian-108/+331
PR #47252 switched stack inspection functions of dbghelp.dll to their newer alternatives that also capture inlined context. Unfortunately, said new alternatives are not present in older dbghelp.dll versions. In particular Windows 7 at the time of writing has dbghelp.dll version 6.1.7601 from 2010, that lacks StackWalkEx and friends. Fixes #50138
2018-06-28Rollup merge of #51824 - vorner:thread-local-try-with-doc, r=kennytmkennytm-1/+1
Fix the error reference for LocalKey::try_with There's no such thing as `ThreadLocalError` and the method obviously returns `AccessError`, so adjusting (probably only outdated docs).
2018-06-28Rollup merge of #50342 - fkjogu:euclidean, r=BurntSushikennytm-2/+20
Document round-off error in `.mod_euc()`-method, see issue #50179 Due to a round-off error the method `.mod_euc()` of both `f32` and `f64` can produce mathematical invalid outputs. If `self` in magnitude is much small than the modulus `rhs` and negative, `self + rhs` in the first branch cannot be represented in the given precision and results into `rhs`. In the mathematical strict sense, this breaks the definition. But given the limitation of floating point arithmetic it can be thought of the closest representable value to the true result, although it is not strictly in the domain `[0.0, rhs)` of the function. It is rather the left side asymptotical limit. It would be desirable that it produces the mathematical more sound approximation of `0.0`, the right side asymptotical limit. But this breaks the property, that `self == self.div_euc(rhs) * rhs + a.mod_euc(rhs)`. The discussion in issue #50179 did not find an satisfying conclusion to which property is deemed more important. But at least we can document the behaviour. Which this pull request does.
2018-06-27Fix doc linksJosef Reinhard Brandl-0/+1
2018-06-27Add is_unnamed on redoxjD91mZM2-24/+58
2018-06-27[fuchsia] Update zx_cprng_draw to target semanticsAdam Barth-26/+2
This change is the final step in improving the semantics of zx_cprng_draw. Now the syscall always generates the requested number of bytes. If the syscall would have failed to generate the requested number of bytes, the syscall either terminates the entire operating system or terminates the calling process, depending on whether the error is a result of the kernel misbehaving or the userspace program misbehaving.
2018-06-27Fix tidy checksjD91mZM2-7/+22
2018-06-27Horrible attempt at cleaning things up that probably just made it worsejD91mZM2-1549/+1348
2018-06-27Fix the error reference for LocalKey::try_withMichal 'vorner' Vaner-1/+1
2018-06-26Revert "Remove functions that always error"jD91mZM2-0/+181
This reverts commit 21d09b983de87fec2e98832f4c30b52f12d6342f.
2018-06-26Mention redox' behavior in doc commentsjD91mZM2-0/+12
2018-06-26Remove functions that always errorjD91mZM2-181/+0
2018-06-26Disallow constructing SocketAddr from third-party codejD91mZM2-2/+2
2018-06-26Make feature unstablejD91mZM2-40/+1
2018-06-26Custom feature gate (I think?)jD91mZM2-40/+40
2018-06-26Trim all lines to 100jD91mZM2-3/+10
2018-06-26Make UnixStream::take_error return None on redoxjD91mZM2-3/+3
2018-06-26Unix sockets on redox!jD91mZM2-1/+733
2018-06-26migrate codebase to `..=` inclusive range patternsZack M. Davis-7/+7
These were stabilized in March 2018's #47813, and are the Preferred Way to Do It going forward (q.v. #51043).
2018-06-26Add read_exact_at and write_all_at methods to FileExt on unixDror Levin-0/+127
2018-06-26Clarify rational behind current implementation of `.mod_euc()`Fabian Kössel-0/+8
2018-06-26Document round-off error in `.mod_euc()`-method, see issue #50179Fabian Kössel-2/+12
2018-06-26Rollup merge of #51786 - cuviper:stat64-pointers, r=Mark-SimulacrumPietro Albini-2/+2
Remove unnecessary stat64 pointer casts In effect, these just casted `&mut stat64` to `*mut stat64`, twice. That's harmless, but it masked a problem when this was copied to new code calling `fstatat`, which takes a pointer to `struct stat`. That will be fixed by #51785, but let's remove the unnecessary casts here too.
2018-06-26Rollup merge of #51730 - MajorBreakfast:pin-get-mut-unchecked, r=withoutboatsPietro Albini-9/+4
New safe associated functions for PinMut - Add safe `get_mut` and `map` - Rename unsafe equivalents to `get_mut_unchecked` and `map_unchecked` The discussion about this starts [in this comment](https://github.com/rust-lang/rust/issues/49150#issuecomment-399604573) on the tracking issue.
2018-06-26Rollup merge of #51642 - GuillaumeGomez:fix-unknown-windows-build, r=oli-obkPietro Albini-0/+3
Fix unknown windows build Fixes #51618.
2018-06-26Rollup merge of #51153 - ogham:panic-and-compile_error-docs, r=GuillaumeGomezPietro Albini-2/+10
Link panic and compile_error docs This adds documentation links between `panic!()` and `compile_error!()` as per #47275, which points out that they’re similar. It also adds a sentence to the `compile_error()` docs I thought could be added.
2018-06-26Auto merge of #50630 - sharkdp:fix-50619, r=sfacklerbors-7/+24
Fix possibly endless loop in ReadDir iterator Certain directories in `/proc` can cause the `ReadDir` iterator to loop indefinitely. We get an error code (22) when calling libc's `readdir_r` on these directories, but `entry_ptr` is `NULL` at the same time, signalling the end of the directory stream. This change introduces an internal state to the iterator such that the `Some(Err(..))` value will only be returned once when calling `next`. Subsequent calls will return `None`. fixes #50619
2018-06-25Remove unnecessary stat64 pointer castsJosh Stone-2/+2
In effect, these just casted `&mut stat64` to `*mut stat64`, twice. That's harmless, but it masked a problem when this was copied to new code calling `fstatat`, which takes a pointer to `struct stat`. That will be fixed by #51785, but let's remove the unnecessary casts here too.
2018-06-25Use fstatat64 where availableJosh Stone-6/+5
2018-06-25Add missing \[allow(missing_docs)\]Guillaume Gomez-0/+1
2018-06-25Add sentence to compile_error!() docsBenjamin Sago-1/+3
It now details why using compile_error!() is different from just not having the final macro_rules!() branch.
2018-06-25Link the docs of panic!() and compile_error!()Benjamin Sago-1/+7
Fixes #47275. These two macros are similar, but different, and could do with documentation links to each other.