| Age | Commit message (Collapse) | Author | Lines |
|
Move two windows process tests to tests/ui
Spawning processes from std unit tests is not something it's well suited for so moving them into tests/ui is more robust and means we don't need to hack around `cmd.exe`.
Follow up to #136630
|
|
Remove outdated `base_port` calculation in std net test
This was never modified since `std::net` was originally introduced in 395709ca6d39ba1e095e404e1d2a169d918b7f0c, when at that time, each CI runner was running multiple jobs concurrently. This seems to have originally caused issues with jobs fighting over the same ports. This is not the case in the current CI infrastructure, so remove this relic in favor of a simple constant base port number.
I double-checked `19600` and nearby port numbers, and this isn't a well-known port number AFAICT[^1].
Closes #136633.
[^1]: At the time of writing.
|
|
sys: net: Add UEFI stubs
- Just a copy of sys/net/unsupported.
- Will make the future net PRs easier to review.
- The reason for a separate folder instead of standalone file is that UEFI has separate the protocols for v4 and v6, and thus will need some abstractions to implement the Rust interface.
r? ``@jhpratt``
|
|
|
|
|
|
|
|
|
|
Stabilise `Cursor::{get_mut, set_position}` in `const` scenarios.
Closes: #130801
This PR stabilises the `const_mut_cursor` feature gate.
|
|
|
|
Stabilize `map_many_mut` feature
This PR stabilize `HashMap::get_many_mut` as `HashMap::get_disjoint_mut` and `HashMap::get_many_unchecked_mut` as `HashMap::get_disjoint_unchecked_mut` per FCP.
FCP at https://github.com/rust-lang/rust/issues/97601#issuecomment-2532710423
Fixes #97601
r? libs
|
|
|
|
This was never modified since `std::net` was originally introduced, when
each CI job was running multiple jobs concurrently which caused issues
with fighting over the same ports. This is not the case in the current
CI infrastructure, so remove this relic.
|
|
`test_proc_thread_attributes`
|
|
- Just a copy of sys/net/unsupported.
- Will make the future net PRs easier to review.
Signed-off-by: Ayush Singh <ayush@beagleboard.org>
|
|
std: move network code into `sys`
As per #117276, this PR moves `sys_common::net` and the `sys::pal::net` into the newly created `sys::net` module. In order to support #135141, I've moved all the current network code into a separate `connection` module, future functions like `hostname` can live in separate modules.
I'll probably do a follow-up PR and clean up some of the actual code, this is mostly just a reorganization.
|
|
uefi: process: Add support for command environment variables
Set environment variables before launching the process and restore the prior variables after the program exists.
This is the same implementation as the one used by UEFI Shell Execute [0].
[0]: https://github.com/tianocore/edk2/blob/2d2642f4832ebc45cb7d5ba9430b933d953b94f2/ShellPkg/Application/Shell/ShellProtocol.c#L1700
|
|
|
|
intrinsic
|
|
Rollup of 6 pull requests
Successful merges:
- #136398 (add UnsafeCell direct access APIs)
- #136465 (Some `rustc_middle` cleanups)
- #136479 (std::fs: further simplify dirent64 handling)
- #136504 (Fix last compare-mode false negatives in tests)
- #136511 (Add `cast_signed` and `cast_unsigned` methods for `NonZero` types)
- #136518 (Add note about `FnPtr` trait being exposed as public bound)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
std::fs: further simplify dirent64 handling
Follow-up to https://github.com/rust-lang/rust/pull/134678.
r? `@tgross35`
|
|
Implement unstable `new_range` feature
Switches `a..b`, `a..`, and `a..=b` to resolve to the new range types.
For rust-lang/rfcs#3550
Tracking issue #123741
also adds the re-export that was missed in the original implementation of `new_range_api`
|
|
Move some std tests to integration tests
Unit tests directly inside of standard library crates require a very fragile way of building that is hard to reproduce outside of bootstrap.
Follow up to https://github.com/rust-lang/rust/pull/133859
|
|
OnceCell & OnceLock docs: Using (un)initialized consistently
Changed
* `set` / `initialize` / `full` to `initialized state`
* `uninitialize` / `empty` to `uninitialized state`
* `f` to `f()`
* Added explaination of `uninitialized state` & `initialized state`
[OnceCell Docs](https://doc.rust-lang.org/nightly/std/cell/struct.OnceCell.html)
[OnceLock Docs](https://doc.rust-lang.org/nightly/std/sync/struct.OnceLock.html)
Fixes #85716
``@rustbot`` label +A-docs
|
|
|
|
|
|
As per #117276, this PR moves `sys_common::net` and the `sys::pal::net` into the newly created `sys::net` module. In order to support #135141, I've moved all the current network code into a separate `connection` module, future functions like `hostname` can live in separate modules.
I'll probably do a follow-up PR and clean up some of the actual code, this is mostly just a reorganization.
|
|
r=oli-obk
Remove rustc_encodable_decodable feature
This has been shown in future-compat reports since Rust 1.79 (https://github.com/rust-lang/rust/pull/116016), released June 2024. Let's see if crater still finds any issues.
Part of https://github.com/rust-lang/rust/issues/134301.
Cc ``@rust-lang/libs-api``
|
|
Fix sentence in process::abort
|
|
Set environment variables before launching the process and restore the
prior variables after the program exists.
This is the same implementation as the one used by UEFI Shell Execute [0].
[0]: https://github.com/tianocore/edk2/blob/2d2642f4832ebc45cb7d5ba9430b933d953b94f2/ShellPkg/Application/Shell/ShellProtocol.c#L1700
Signed-off-by: Ayush Singh <ayush@beagleboard.org>
|
|
Stabilize `once_wait`
Closes: https://github.com/rust-lang/rust/issues/127527.
`@rustbot` label: +T-libs-api
r? libs-api
|
|
docs: Documented Send and Sync requirements for Mutex + MutexGuard
This an attempt to continue where #123225 left off.
I did some light clean up from the work done in that PR.
I also documented the `!Send` + `Sync` implementations for `MutexGuard` to the best of my knowledge.
Let me know if I got anything wrong :smile:
fixes #122856
cc: ``@IoaNNUwU``
r? ``@joboet``
|
|
|
|
|
|
|
|
|
|
|
|
joshtriplett:would-you-could-you-with-some-locks--would-you-could-you-in-some-docs, r=m-ou-se
Improve documentation for file locking
Add notes to each method stating that locks get dropped on close.
Clarify the return values of the try methods: they're only defined if
the lock is held via a *different* file handle/descriptor. That goes
along with the documentation that calling them while holding a lock via
the *same* file handle/descriptor may deadlock.
Document the behavior of unlock if no lock is held.
r? `@m-ou-se`
(Documentation changes requested in https://github.com/rust-lang/rust/issues/130994 .)
|
|
uefi: Implement path
This PR is split off from https://github.com/rust-lang/rust/pull/135368 to reduce noise.
UEFI paths can be of 4 types:
1. Absolute Shell Path: Uses shell mappings
2. Absolute Device Path: this is what we want
3. Relative root: path relative to the current root.
4. Relative
Absolute shell path can be identified with `:` and Absolute Device path can be identified with `/`. Relative root path will start with `\`.
The algorithm is mostly taken from edk2 UEFI shell implementation and is somewhat simple. Check for the path type in order.
For Absolute Shell path, use `EFI_SHELL->GetDevicePathFromMap` to get a BorrowedDevicePath for the volume.
For Relative paths, we use the current working directory to construct the new path.
BorrowedDevicePath abstraction is needed to interact with `EFI_SHELL->GetDevicePathFromMap` which returns a Device Path Protocol with the lifetime of UEFI shell.
Absolute Shell paths cannot exist if UEFI shell is missing.
cc `@nicholasbishop`
|
|
|
|
Add notes to each method stating that locks get dropped on close.
Clarify the return values of the try methods: they're only defined if
the lock is held via a *different* file handle/descriptor. That goes
along with the documentation that calling them while holding a lock via
the *same* file handle/descriptor may deadlock.
Document the behavior of unlock if no lock is held.
|
|
Rollup of 8 pull requests
Successful merges:
- #133382 (Suggest considering casting fn item as fn pointer in more cases)
- #136092 (Test pipes also when not running on Windows and Linux simultaneously)
- #136190 (Remove duplicated code in RISC-V asm bad-reg test)
- #136192 (ci: remove unused windows runner)
- #136205 (Properly check that array length is valid type during built-in unsizing in index)
- #136211 (Update mdbook to 0.4.44)
- #136212 (Tweak `&mut self` suggestion span)
- #136214 (Make crate AST mutation accessible for driver callback)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Test pipes also when not running on Windows and Linux simultaneously
Fixes https://github.com/rust-lang/rust/pull/135635#pullrequestreview-2574184488.
Based on top of #135635 to avoid merge conflicts.
|
|
r=nicholasbishop,Noratrieb
uefi: process: Fix args
- While working on process env support, I found that args were currently broken. Not sure how I missed it in the PR, but well here is the fix.
- Additionally, no point in adding space at the end of args.
|
|
This allows Rust on Fuchsia to use a number of function calls from libc:
* dirfd
* fdatasync
* flock with LOCK_EX, LOCK_SH, LOCK_NB, LOCK_UN
* fstatat
|
|
* Renames the methods:
* `get_many_mut` -> `get_disjoint_mut`
* `get_many_unchecked_mut` -> `get_disjoint_unchecked_mut`
* Does not rename the feature flag: `get_many_mut`
* Marks the feature as stable
* Renames some helper stuff:
* `GetManyMutError` -> `GetDisjointMutError`
* `GetManyMutIndex` -> `GetDisjointMutIndex`
* `get_many_mut_helpers` -> `get_disjoint_mut_helpers`
* `get_many_check_valid` -> `get_disjoint_check_valid`
This only touches slice methods.
HashMap's methods and feature gates are not renamed here
(nor are they stabilized).
|
|
- While working on process env support, I found that args were currently
broken. Not sure how I missed it in the PR, but well here is the fix.
- Additionally, no point in adding space at the end of args.
Signed-off-by: Ayush Singh <ayush@beagleboard.org>
|
|
Document powf and powi values that are always 1.0
fixes bug #90429
|
|
Fixes #85394
|
|
|
|
as well as `HashMap::get_many_unchecked_mut` to
`HashMap::get_disjoint_unchecked_mut`.
|