| Age | Commit message (Collapse) | Author | Lines |
|
change tests in std, core and coretests.
|
|
|
|
additional edge cases tests for `path.rs` 🧪
This pull request adds a few new edge case tests to the `std::path` module. The new tests cover scenarios such as paths with only separators, non-ASCII and Unicode characters, embedded new lines, etc. Each new test is documented with some helpful in-line comments as well.
|
|
|
|
|
|
|
|
|
|
The previous commit moved all test files from `std` to `core` so git
understands the move. Not all functionality is actually testable in
`core`, however, so perform move the relevant portions back. Changes
from inherent to module methods is also done since this is the form of
math operations available in `core` (as `core_float_math`).
|
|
Many float-related tests in `std` only depend on `core`, so move the
tests there. This also allows us to verify functions from
`core_float_math`.
Since the majority of test files need to be moved to `coretests`, move
the files here without any cleanup; this is done in a followup commit.
This makes git history slightly cleaner, but coretests will not build
immediately after this commit.
|
|
|
|
1. analogous to std::cell::Ref(Mut)::filter_map.
2. doesn't imply `Try` genericizability.
|
|
New compiler configuration has been introduced that is designed to
replace the build script configuration `reliable_f16`, `reliable_f128`,
`reliable_f16_math`, and `reliable_f128_math`. Do this replacement here,
which allows us to clean up `std`'s build script.
All tests are gated by `#[cfg(bootstrap)]` rather than doing a more
complicated `cfg(bootstrap)` / `cfg(not(bootstrap))` split since the
next beta split is within two weeks.
|
|
|
|
Ref: https://github.com/rust-lang/rust/issues/126840#issuecomment-2802321146
|
|
fix pthread-based tls on apple targets
Tries to fix #127773.
|
|
|
|
Mark some std tests as requiring `panic = "unwind"`
This allows these test modules to pass on builds/targets without unwinding support, where `panic = "abort"` - the ignored tests are for functionality that's not supported on those targets.
|
|
|
|
Stablize anonymous pipe
Since #135822 is staled, I create this PR to stablise anonymous pipe
Closes #127154
try-job: test-various
|
|
Add `From<{integer}>` for `f16`/`f128` impls
This PR adds `impl From<{bool,i8,u8}> for f16` and `impl From<{bool,i8,u8,i16,u16,i32,u32}> for f128`.
The `From<{i64,u64}> for f128` impls are left commented out as adding them would allow using `f128` on stable before it is stabilised like in the following example:
```rust
fn f<T: From<u64>>(x: T) -> T { x }
fn main() {
let x = f(1.0); // the type of the literal is inferred to be `f128`
}
```
None of the impls added in this PR have this issue as they are all, at minimum, also implemented by `f64`.
This PR will need a crater run for the `From<{i32,u32}>` impls, as `f64` is no longer the only float type to implement them (similar to the cause of #125198).
cc `@bjoernager`
r? `@tgross35`
Tracking issue: #116909
|
|
r=Mark-Simulacrum
expose `is_s390x_feature_detected!` from `std::arch`
tracking issue: https://github.com/rust-lang/rust/issues/135413
implementation: https://github.com/rust-lang/stdarch/pull/1699 (more features added in https://github.com/rust-lang/stdarch/pull/1720)
This macro was part of the recent `stdarch` synchronization, but not yet exposed via `std::arch`.
r? libs
|
|
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
|
|
|
|
The LLVM issue [1] was fixed with [2], which is included in the LLVM20
upgrade. Tests no longer fail, so enable them here.
[1]: https://github.com/llvm/llvm-project/pull/98681
[2]: https://github.com/llvm/llvm-project/pull/98681
|
|
This allows these test modules to pass on builds/targets without
unwinding support, where `panic = "abort"` - the ignored tests are for
functionality that's not supported on those targets.
|
|
|
|
|
|
|
|
ignore win_delete_self test in Miri
Follow-up to https://github.com/rust-lang/rust/pull/134679, fixes miri-test-libstd on Windows
Cc `@ChrisDenton` `@Mark-Simulacrum`
|
|
|
|
|
|
Rollup of 5 pull requests
Successful merges:
- #134679 (Windows: remove readonly files)
- #136213 (Allow Rust to use a number of libc filesystem calls)
- #136530 (Implement `x perf` directly in bootstrap)
- #136601 (Detect (non-raw) borrows of null ZST pointers in CheckNull)
- #136659 (Pick the max DWARF version when LTO'ing modules with different versions )
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Windows: remove readonly files
When calling `remove_file`, we shouldn't fail to delete readonly files. As the test makes clear, this make the Windows behaviour consistent with other platforms. This also makes us internally consistent with `remove_dir_all`.
try-job: x86_64-msvc-ext1
|
|
std: move `io` module out of `pal`, get rid of `sys_common::io`
Part of #117276.
This does two related things:
1. It moves the platform-specific definitions for `IoSlice`, `IoSliceMut` and `is_terminal` out of `pal` and into `sys` and unifies some of them.
2. It gets rid of `sys_common::io`, moving the non-platform-specific test helpers into `std::test_helpers` and the buffer size definition to the new `sys::io` module.
|
|
|
|
While working on #122661, some of these started triggering our "unnecessary parens" lints due to a change in the `assert!` desugaring. A cursory search identified a few more. Some of these have been carried from before 1.0, were a bulk rename from the previous name of `assert!` left them in that state. I went and removed as many of these unnecessary parens as possible in order to have fewer annoyances in the future if we make the lint smarter.
|
|
|
|
|
|
|
|
This removes two minor OnceLock tests which test private methods. The
rest of the tests should be more than enough to catch mistakes in those
private methods. Also makes ReentrantLock::try_lock public. And finally
it makes the mpmc tests actually run.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This does need EMCC_CFLAGS="-s MAXIMUM_MEMORY=2GB" avoid several OOMs.
|