| Age | Commit message (Collapse) | Author | Lines |
|
|
|
Fix sync_once_cell_does_not_leak_partially_constructed_boxes
Spinning multiple threads in this test causes a deadlock in
SGX where thread scheduling is not preemptive.
cc @jethrogb @AdrianCX
|
|
Previously, when non-empty sequence of empty IoSlices have been provided
to `Write::write_all_vectored`, the buffers would be written as is with
`Write::write_vectored` and subsequently the return value `Ok(0)` would
be misinterpreted as an error.
Avoid writes without any data by advancing the buffers first. This
matches the documented behaviour of `Write::write_all_vectored`
and is analogous to what happens in `Write::write_all`.
|
|
Remove trait LengthAtMost32
This is a continuation of https://github.com/rust-lang/rust/pull/74026 preserving the original burrbull's commit.
I talked to @burrbull, he suggested me to finish his PR.
|
|
Document the where keyword
Partial fix of #34601 (and last PR for it 🎉).
This documents the `where` keyword.
@rustbot modify labels: T-doc,C-enhancement
|
|
Document the ref keyword
Partial fix for #34601.
This documents the `ref` keyword with two examples, one failing to compile because the `ref` keyword is missing, and the same example fixed with the keyword inserted in the correct place.
It also explains (very *very* rapidly) the differences between `&` and `ref`.
I put a link to the best place I could find in the Reference but there may be something better that I didn't find.
|
|
Miri: use extern fn to expose interpreter operations to program; fix leak checker on Windows
This PR realizes an idea that @oli-obk has been suggesting for a while: to use Miri-specific `extern` functions to provide some extra capabilities to the program. Initially, we have two of these methods, which libstd itself needs:
* `miri_start_panic`, which replaces the intrinsic of the same name (mostly for consistency, to avoid having multiple mechanisms for Miri-specific functionality).
* `miri_static_root`, which adds an allocation to a list of static "roots" that Miri considers as not having leaked (including all memory reachable through them). This is needed for https://github.com/rust-lang/miri/issues/1302.
We use `extern` functions instead of intrinsics for this so that user code can more easily call these Miri hoolks -- e.g. `miri_static_root` should be useful for https://github.com/rust-lang/miri/issues/1318.
The Miri side of this is at https://github.com/rust-lang/miri/pull/1485.
r? @oli-obk
|
|
to compile)
|
|
|
|
revise RwLock for HermitCore
- current version is derived from the wasm implementation
- increasing the readability of `Condvar`
- simplify the interface to the libos
|
|
|
|
|
|
|
|
|
|
Revert libbacktrace -> gimli
This reverts 4cbd265c119cb1a5eb92e98d2bb93466f05efa46 028f8d7b85898683b99e05564cd2976c7e0d5b43 13db3cc1e8d2fd4b8e7c74d91002274d7b62801b d7a36d8964c927863faef5d3b42da08f37e5896c (and technically 79673d300915f846726c27b9e1974dc451013ee9 but it's made empty by previous reverts).
The current plan is to land this PR as a temporary change, so that we can get a better handle on the regressions introduced by it. Trying to fix/examine them in master is difficult, and we want to be better able to evaluate them without impact to other PRs being landed in the mean time.
That said, it is currently *my* belief that gimli, in one form or another, will need to land sometime soon. I think it's quite likely that it may slip a week or two, but I would personally push for re-landing it then "regardless" of the regressions. We should try to focus efforts on understanding and removing as much of the performance impact as possible, as everyone pretty much agrees that it should be quite minimal (and entirely in the linker, basically).
r? @nnethercote
|
|
Remove Linux workarounds for missing CLOEXEC support
Now that #74163 updated the minimum Linux kernel to 2.6.32, we can
assume the availability of APIs that open file descriptors that are
already set to close on exec, including the flags `O_CLOEXEC`,
`SOCK_CLOEXEC`, and `F_DUPFD_CLOEXEC`.
Closes #74519.
|
|
Prefer constant over function
Just that I prefer constants over functions that can be made const.
|
|
one more Path::with_extension example, to demonstrate behavior
|
|
add a Backtrace::disabled function
Based upon @dtolnay's suggestion here: https://github.com/dtolnay/anyhow/pull/97#issuecomment-647172942
|
|
libstd/libcore: fix various typos
|
|
|
|
Co-authored-by: David Tolnay <dtolnay@gmail.com>
|
|
|
|
|
|
Add a FIXME to build scripts in profiler_builtins
|
|
|
|
This reverts commit 13db3cc1e8d2fd4b8e7c74d91002274d7b62801b.
|
|
This reverts commit 028f8d7b85898683b99e05564cd2976c7e0d5b43.
|
|
Now that #74163 updated the minimum Linux kernel to 2.6.32, we can
assume the availability of APIs that open file descriptors that are
already set to close on exec, including the flags `O_CLOEXEC`,
`SOCK_CLOEXEC`, and `F_DUPFD_CLOEXEC`.
|
|
Spinning multiple threads in this test causes a deadlock in
SGX where thread scheduling is not preemptive.
|
|
Add `RawFd` to WASI's `std::os::wasi::prelude`.
Add `RawFd` to WASI's `std::os::wasi::prelude`, making it consistent
with all other platforms which also have `AsRawFd`, `FromRawFd`, and
`IntoRawFd` in their respective preludes.
|
|
r=kennytm
Fix duplicate maybe_uninit_extra attribute
Introduced in #72414
|
|
|
|
Use italics for O notation
In documentation, I think it makes sense to italicize O notation (*O(n)*) as opposed to using back-ticks (`O(n)`). Visually, back-ticks focus the reader on the literal characters being used, making them ideal for representing code. Using italics, as far I can tell, more closely follows typographic conventions in mathematics and computer science.
Just a suggestion, of course! 😇
|
|
std: Fix compilation without backtrace feature
This should hopefully handle #74484 but in any case fixes compilation of
the standard library without the `backtrace` feature. The need for this
feature is somewhat unclear now because the `backtrace` crate should
always compile (no more C code!) but we can handle that later if
necessary.
|
|
Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
|
|
fix documentation surrounding the `in` and `for` keywords
Addresses #74529
The `in` keyword incorrectly referenced the `Iterator` trait. This reference was changed to `IntoIterator` without changing the underlying link.
Additionally, the `IntoIterator` trait was referenced towards the end of the documentation for `for`. An additional reference was added earlier and broadened the existing documentation from any iterator to anything that can be turned into an iterator.
|
|
r=Mark-Simulacrum
Improve Read::read_exact documentation
Fixes #72186.
For now I simply added a link to `Read::read` and held off changing the text in `Read::read_exact`. I can do it if it is deemed necessary.
@rustbot modify labels: C-enhancement, T-libs
|
|
Documentation for the false keyword
Partial fix of #34601.
Short documentation for the false keyword mainly pointing to the `true` keyword.
|
|
This should hopefully handle #74484 but in any case fixes compilation of
the standard library without the `backtrace` feature. The need for this
feature is somewhat unclear now because the `backtrace` crate should
always compile (no more C code!) but we can handle that later if
necessary.
|
|
Clear up wording regarding the iterator and usage of `break`.
Co-authored-by: Josh Triplett <josh@joshtriplett.org>
|
|
|
|
|
|
|
|
|
|
Co-authored-by: Joshua Nelson <joshua@yottadb.com>
|
|
More intra-doc links, add explicit exception list to linkchecker
Fixes the broken links behind #32553
Progress on #32130 and #32129 except for a small number of links. Instead of whitelisting entire files, I've changed the code to whitelist specific links in specific files, and added a comment requesting people explain the reasons they add exceptions. I'm not sure if we should close those issues in favor of the already filed intra-doc link issues.
|
|
Remove combine function
Comparing two array directly helps generate better assert message.
Resolve https://github.com/rust-lang/rust/pull/74271/files#r454538514
|
|
r=LukasKalbertodt
Deny unsafe operations in unsafe functions in libstd/alloc.rs
Partial fix of #73904.
This encloses `unsafe` operations in `unsafe fn` in `libstd/alloc.rs`.
@rustbot modify labels: F-unsafe-block-in-unsafe-fn
|
|
|