| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
These targets have system limits on the thread names, 16 and 64 bytes
respectively, and `pthread_setname_np` returns an error if the name is
longer. However, we're not in a context that can propagate errors when
we call this, and we used to implicitly truncate on Linux with `prctl`,
so now we manually truncate these names ahead of time.
|
|
io_safety was stabilized in Rust 1.63, so mark the io_safety exports in
`std::os::wasi::io` as stable.
Fixes #103306.
|
|
(cherry picked from commit 95ae993bd86b97aff9a27498f2187fef431cab58)
|
|
This reverts commit 3fc35b5b935e390c61ea2bbf744838b2632b2df1.
(cherry picked from commit a955ef2c8c95a289f0753e533b690c576b1806bf)
|
|
|
|
On later stages, the feature is already stable.
Result of running:
rg -l "feature.let_else" compiler/ src/librustdoc/ library/ | xargs sed -s -i "s#\\[feature.let_else#\\[cfg_attr\\(bootstrap, feature\\(let_else\\)#"
|
|
Adding "backtrace off" option for fuchsia targets
Used for improving compiler test suite results on Fuchsia targets
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Remove manual <[u8]>::escape_ascii
`@rustbot` label: +C-cleanup
|
|
Check if TCS is a null pointer on SGX
The `EENTER` instruction only checks if the TCS is aligned, not if it zero. Saying the address returned is a `NonNull<u8>` (for which `Tcs` is a type alias) is unsound. As well-behaved runners will not put the TCS at address zero, so the definition of `Tcs` is correct. However, `std` should check the address before casting it to a `NonNull`.
ping `@jethrogb` `@raoulstrackx`
`@rustbot` label I-unsound
|
|
|
|
Optimize thread parking on NetBSD
As the futex syscall is not present in the latest stable release, NetBSD cannot use the efficient thread parker and locks Linux uses. Currently, it therefore relies on a pthread-based parker, consisting of a mutex and semaphore which protect a state variable. NetBSD however has more efficient syscalls available: [`_lwp_park`](https://man.netbsd.org/_lwp_park.2) and [`_lwp_unpark`](https://man.netbsd.org/_lwp_unpark.2). These already provide the exact semantics of `thread::park` and `Thread::unpark`, but work with thread ids. In `std`, this ID is here stored in an atomic state variable, which is also used to optimize cases were the parking token is already available at the time `thread::park` is called.
r? `@m-ou-se`
|
|
Explicitly link kernel32.lib from alloc
|
|
|
|
doc: fix minor typo
|
|
|
|
Rollup of 5 pull requests
Successful merges:
- #101366 (Restore old behaviour on broken UNC paths)
- #101492 (Suggest adding array lengths to references to arrays if possible)
- #101529 (Fix the example code and doctest for Formatter::sign_plus)
- #101573 (update `ParamKindOrd`)
- #101612 (Fix code generation of `Rvalue::Repeat` with 128 bit values)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Restore old behaviour on broken UNC paths
This fixes #101358 by restoring the behaviour from previous stable Rust versions. I'm not convinced this is ultimately right but I think it's less wrong and maybe this should be backported to beta?
r? libs
|
|
|
|
|
|
Fix hermit warnings
This fixes two `unused_imprt` and one `dead_code` warning for hermit.
|
|
Hermit: Add File::set_time stub
This is not supported on hermit yet. This change is required for compiling std.
|
|
Rollup of 14 pull requests
Successful merges:
- #101343 (Add -api-level to pm command)
- #101416 (stdio: Document no support for writing to non-blocking stdio/stderr)
- #101435 (Remove unnecessary `EMIT_MIR_FOR_EACH_BITWIDTH`)
- #101493 (Pass ImplTraitContext as &mut to avoid the need of ImplTraitContext::reborrow)
- #101502 (Do not suggest a semicolon for a macro without `!`)
- #101503 (Add debug calls)
- #101506 (rustdoc: remove unused CSS `#main-content > .since`)
- #101507 (rustdoc: remove unused CSS `#main-content > table td`)
- #101521 (Rustdoc-Json: More accurate struct type.)
- #101525 (Fix typo in pass_manager.rs)
- #101534 (rustdoc: remove unused mobile CSS `.rustdoc { flex-direction }`)
- #101535 (Fix error printing mistake in tidy)
- #101536 (Add documentation for Attr::is_doc_comment)
- #101538 (rustdoc: remove unused CSS `.content .methods > div`)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Open a BCrypt algorithm handle
Fixes #101474, supplants #101456.
Replaces use of a pseduo handle with manually opening a algorithm handle.
Most interesting thing here is the atomics.
r? `@thomcc`
|
|
Printing to stdio/stderr that have been opened with non-blocking
(O_NONBLOCK in linux) can result in an error, which is not handled
by std::io module causing a panic.
Signed-off-by: Usama Arif <usama.arif@bytedance.com>
|
|
|
|
|
|
|
|
Don't duplicate file descriptors into stdio fds
Ensures that file descriptors are never duplicated into the stdio fds even if a stdio fd has been closed.
|
|
Fix cleanup for uninitialized stdout
Fixes #101375 by disabling buffering even if the buffer was not initialized yet.
|
|
more clippy::perf fixes
|
|
|
|
Make `ReentrantMutex` movable and `const`
As `MovableMutex` is now `const`, it can be used to simplify the implementation and interface of the internal reentrant mutex type. Consequently, the standard error stream does not need to be wrapped in `OnceLock` and `OnceLock::get_or_init_pin()` can be removed.
|
|
|
|
|
|
This is not supported on hermit yet. This change is required for compiling std.
|
|
Forbid mixing `System` with direct sytem allocator calls
e.g. [on windows](https://github.com/rust-lang/rust/blob/dec689432fac6720b2f18101ac28a21add98b1b8/library/std/src/sys/windows/alloc.rs#L129-L178), trying to mix `System::alloc` and `HeapFree` will not work because of the extra work done to serve higher alignments.
|
|
|
|
|
|
|
|
|
|
|