about summary refs log tree commit diff
path: root/library/std/tests
AgeCommit message (Collapse)AuthorLines
2025-04-05Rollup merge of #137897 - xTachyon:tls-fix, r=thomcc,jieyouxuStuart Cook-1/+22
fix pthread-based tls on apple targets Tries to fix #127773.
2025-04-04Expose algebraic floating point intrinsicsCalder Coalson-2/+82
2025-03-22Rollup merge of #138294 - paulmenage:test-panic-unwind, r=bjorn3Matthias Krüger-2/+34
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.
2025-03-18fix pthread-based tls on apple targetsAndrei Damian-1/+22
2025-03-17Rollup merge of #137793 - NobodyXu:stablise-annoymous-pipe, r=joshtriplettJacob Pratt-2/+0
Stablize anonymous pipe Since #135822 is staled, I create this PR to stablise anonymous pipe Closes #127154 try-job: test-various
2025-03-17Auto merge of #138363 - beetrees:f16-f128-integer-convert, r=Amanieubors-0/+43
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
2025-03-16Rollup merge of #138275 - folkertdev:expose-is-s390x-feature-detected, ↵许杰友 Jieyou Xu (Joe)-0/+30
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
2025-03-14Stablize feature `anonymous_pipe`Jiahao XU-2/+0
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2025-03-11Add `From<{integer}>` for `f16`/`f128` implsbeetrees-0/+43
2025-03-11Enable `f16` tests for `powf`Trevor Gross-43/+41
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
2025-03-10Mark some std tests as requiring `panic = "unwind"`Paul Menage-2/+34
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.
2025-03-09expose `is_s390x_feature_detected` from `std::arch`Folkert de Vries-0/+30
2025-02-13std: Apply deprecated_safe_2024Eric Huss-33/+51
2025-02-13library: Update rand to 0.9.0Eric Huss-2/+2
2025-02-10Rollup merge of #136805 - RalfJung:miri-win-delete-self, r=NoratriebJubilee-0/+1
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`
2025-02-10ignore win_delete_self test in MiriRalf Jung-0/+1
2025-02-09Mark extern blocks as unsafeMichael Goulet-2/+2
2025-02-09Auto merge of #136754 - Urgau:rollup-qlkhjqr, r=Urgaubors-0/+8
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
2025-02-09Rollup merge of #134679 - ChrisDenton:rm-readonly, r=Mark-SimulacrumUrgau-0/+8
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
2025-02-08Rollup merge of #135696 - joboet:move_pal_io, r=NoratriebMatthias Krüger-1/+1
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.
2025-02-07std: get rid of `sys_common::io`joboet-1/+1
2025-02-06Remove some unnecessary parens in `assert!` conditionsEsteban Küber-13/+13
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.
2025-02-02Remove stabilized feature gatebjorn3-2/+1
2025-01-26Move env modifying tests to a separate integration testbjorn3-160/+166
2025-01-26Fix for SGXbjorn3-1/+1
2025-01-26Move std::sync unit tests to integration testsbjorn3-0/+4120
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.
2025-01-26Move std::thread_local unit tests to integration testsbjorn3-0/+420
2025-01-26Move std::time unit tests to integration testsbjorn3-0/+229
2025-01-26Move std::path unit tests to integration testsbjorn3-0/+1978
2025-01-26Move std::panic unit tests to integration testsbjorn3-0/+56
2025-01-26Move std::num unit tests to integration testsbjorn3-0/+230
2025-01-26Move std float unit tests to integration testsbjorn3-0/+3797
2025-01-26Move std::error unit tests to integration testsbjorn3-0/+442
2025-01-26Move std::env unit tests to integration testsbjorn3-0/+120
2025-01-26Windows: Test that deleting a running binary failsChris Denton-0/+8
2025-01-24Fix testing of the standard library with Emscriptenbjorn3-2/+3
This does need EMCC_CFLAGS="-s MAXIMUM_MEMORY=2GB" avoid several OOMs.
2025-01-17Move `std::pipe::*` into `std::io`Jiahao XU-2/+1
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2024-11-04Fix and undeprecate home_dir()Kornel-6/+6
2024-10-18Avoid shadowing user provided types or type aliases in `thread_local!`许杰友 Jieyou Xu (Joe)-0/+23
By using qualified imports, i.e. `$crate::...::LocalKey`.
2024-10-10rustc_target: Add sme-b16b16 as an explicit aarch64 target featureKajetan Puchalski-0/+1
LLVM 20 split out what used to be called b16b16 and correspond to aarch64 FEAT_SVE_B16B16 into sve-b16b16 and sme-b16b16. Add sme-b16b16 as an explicit feature and update the codegen accordingly.
2024-09-29Fix std tests for wasm32-wasip2 targetNicola Krumschmidt-3/+3
2024-09-22Add test for `available_parallelism()`Oli Iliffe-0/+18
This is a redo of (this PR)[https://github.com/rust-lang/rust/pull/104095]. Add test for available_parallelism Add test for available_parallelism Add test for Add test for
2024-08-27rustc_target: Add SME aarch64 featuresKajetan Puchalski-0/+13
Add SME aarch64 features already supported by LLVM and Linux. This commit adds compiler support for the following features: - FEAT_SME - FEAT_SME_F16F16 - FEAT_SME_F64F64 - FEAT_SME_F8F16 - FEAT_SME_F8F32 - FEAT_SME_FA64 - FEAT_SME_I16I64 - FEAT_SME_LUTv2 - FEAT_SME2 - FEAT_SME2p1 - FEAT_SSVE_FP8DOT2 - FEAT_SSVE_FP8DOT4 - FEAT_SSVE_FP8FMA
2024-08-27rustc_target: Add various aarch64 featuresKajetan Puchalski-0/+21
Add various aarch64 features already supported by LLVM and Linux. The features are marked as unstable using a newly added symbol, i.e. aarch64_unstable_target_feature. Additionally include some comment fixes to ensure consistency of feature names with the Arm ARM and support for architecture version target features up to v9.5a. This commit adds compiler support for the following features: - FEAT_CSSC - FEAT_ECV - FEAT_FAMINMAX - FEAT_FLAGM2 - FEAT_FP8 - FEAT_FP8DOT2 - FEAT_FP8DOT4 - FEAT_FP8FMA - FEAT_FPMR - FEAT_HBC - FEAT_LSE128 - FEAT_LSE2 - FEAT_LUT - FEAT_MOPS - FEAT_LRCPC3 - FEAT_SVE_B16B16 - FEAT_SVE2p1 - FEAT_WFxT
2024-07-29Reformat `use` declarations.Nicholas Nethercote-16/+15
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2024-07-23Initial implementation of anonymous_pipeJiahao XU-0/+39
Co-authored-by: Alphyr <47725341+a1phyr@users.noreply.github.com> Co-authored-by: Jubilee <46493976+workingjubilee@users.noreply.github.com> Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
2024-06-20Add blank lines after module-level `//!` comments.Nicholas Nethercote-0/+1
Most modules have such a blank line, but some don't. Inserting the blank line makes it clearer that the `//!` comments are describing the entire module, rather than the `use` declaration(s) that immediately follows.
2024-06-12Make PathBuf less Ok with adding UTF-16 then `into_string`Jubilee Young-0/+14
2024-05-24Stop using the avx512er and avx512pf x86 target featuresHans Wennborg-2/+0
They are no longer supported by LLVM 19. Fixes #125492
2024-05-05Rename test for issue 21058Ryan Lowe-8/+8