about summary refs log tree commit diff
path: root/library
AgeCommit message (Collapse)AuthorLines
2025-03-06Allow optimizing out `panic_bounds_check` in Unicode checks.Markus Reiter-39/+34
2025-03-06Update stdarchEric Huss-0/+5
2025-03-06Don't field-project (`.0`) into SIMD typesScott McMurray-11/+54
2025-03-06Rollup merge of #138038 - tgross35:update-builtins, r=tgross35Michael Goulet-4/+4
Update `compiler-builtins` to 0.1.151 This enables `f16` builtins for loongarch [1] and adds support for Cygwin [2]. [1]: https://github.com/rust-lang/compiler-builtins/pull/770 [2]: https://github.com/rust-lang/compiler-builtins/pull/774 try-job: dist-loongarch64-linux try-job: dist-loongarch64-musl
2025-03-06Rollup merge of #137808 - jswrenn:droppy-unsafe-fields, r=nnethercoteMichael Goulet-2/+2
Do not require that unsafe fields lack drop glue Instead, we adopt the position that introducing an `unsafe` field itself carries a safety invariant: that if you assign an invariant to that field weaker than what the field's destructor requires, you must ensure that field is in a droppable state in your destructor. See: - https://github.com/rust-lang/rfcs/pull/3458#discussion_r1971676100 - https://rust-lang.zulipchat.com/#narrow/channel/213817-t-lang/topic/unsafe.20fields.20RFC/near/502113897 Tracking Issue: #132922
2025-03-06Rollup merge of #137772 - thaliaarchi:bstr-display, r=joshtriplettMichael Goulet-1/+3
Fix char count in `Display` for `ByteStr` `ByteStr as Display` performs a byte count when a char count is required. r? ```````````@joshtriplett```````````
2025-03-06Rollup merge of #137764 - compiler-errors:always-applicable-negative-impl, ↵Michael Goulet-1/+0
r=lcnr Ensure that negative auto impls are always applicable r? lcnr (or reassign if you dont want to review) https://github.com/rust-lang/rust/issues/68318#issuecomment-2689265030
2025-03-06Rollup merge of #137327 - arlosi:home-dir, r=Mark-SimulacrumMichael Goulet-5/+0
Undeprecate env::home_dir #132515 fixed the implementation of `env::home_dir`, but didn't remove the deprecation. Based on [this comment](https://github.com/rust-lang/rust/pull/132515#discussion_r1829715262), libs-api decided to undeprecate in the next release. Let's do that! cc #132650
2025-03-06Rollup merge of #136922 - oli-obk:pattern-types-option-ends, r=BoxyUwUMichael Goulet-0/+62
Pattern types: Avoid having to handle an Option for range ends in the type system or the HIR Instead, 1. during hir_ty_lowering, we now generate constants for the min/max when the range doesn't have a start/end specified. 2. in a later commit we generate those constants during ast lowering, simplifying everything further by not having to handle the range end inclusivity anymore in the type system (and thus avoiding any issues of `0..5` being different from `0..=4` I think it makes all the type system code simpler, and the cost of the extra `ConstKind::Value` processing seems negligible. r? `@BoxyUwU` cc `@joshtriplett` `@scottmcm`
2025-03-06Rollup merge of #135895 - hkBst:patch-15, r=joboetMichael Goulet-5/+11
Document workings of successors more clearly This is an attempt to fix #135087 together with https://github.com/rust-lang/rust/pull/135886, but I am not sure if I've succeeded in adding much clarity here, so don't be shy with your comments.
2025-03-07Fix broken link to Miri intrinsics in documentationRedddy-1/+1
Replaced the outdated link to https://github.com/rust-lang/miri/blob/master/src/shims/intrinsics with the correct link https://github.com/rust-lang/miri/tree/master/src/intrinsics in the library/core/src/intrinsics/mod.rs file.
2025-03-06Stabilize `const_copy_from_slice` featureokaneco-2/+1
Stabilizes `copy_from_slice` method on `[T]`
2025-03-06Remove the `Option` part of range ends in the HIROli Scherer-0/+62
2025-03-06Use the v2 resolver in the workspaceTrevor Gross-0/+1
2025-03-06Migrate `testcrate` and `panic-handler` to edition 2024Trevor Gross-15/+20
Includes `extern` -> `unsafe extern` blocks and formatting updates.
2025-03-05Make `is_le` and friends work like clang'sScott McMurray-6/+16
2025-03-05feat - FEAT_LUT neon instrinsicsJames Barford-Evans-1/+1606
2025-03-05Rollup merge of #137728 - Darksonn:no-tuple-unsize, r=oli-obk许杰友 Jieyou Xu (Joe)-10/+1
Remove unsizing coercions for tuples See https://github.com/rust-lang/rust/issues/42877#issuecomment-2686010847 and below comments for justification. Tracking issue: #42877 Fixes: #135217
2025-03-05Rollup merge of #137679 - bjorn3:coretests_improvements, r=jieyouxu,onur-ozkan许杰友 Jieyou Xu (Joe)-2/+1
Various coretests improvements The first commit is not yet strictly necessary as directly testing libcore works though useless work, but will be necessary once https://github.com/rust-lang/rust/pull/136642 migrates the liballoc tests into a separate package. The second commit fixes https://github.com/rust-lang/rust/issues/137478 and ensures that coretests actually gets tested on all CI job. The third commit fixes an error that didn't get caught because coretests doesn't run on the wasm32 CI job.
2025-03-05Rollup merge of #137569 - aDotInTheVoid:for-iurii, r=ibraheemdev许杰友 Jieyou Xu (Joe)-2/+1
Stabilize `string_extend_from_within` FCP'd here: https://github.com/rust-lang/rust/issues/103806#issuecomment-2674989531. Closes #103806.
2025-03-05Rollup merge of #137477 - Ayush1325:uefi-service-binding, r=Noratrieb许杰友 Jieyou Xu (Joe)-1/+60
uefi: Add Service Binding Protocol abstraction - Some UEFI protocols such as TCP4, TCP6, UDP4, UDP6, etc are managed by service binding protocol. - A new instance of such protocols is created and destroyed using the corresponding service binding protocol. - This PR adds abstractions to make using such protocols simpler using Rust Drop trait. - The reason to add these abstractions in a seperate PR from TCP4 Protocol is to make review easier. [EFI_SERVICE_BINDING_PROTCOL](https://uefi.org/specs/UEFI/2.11/11_Protocols_UEFI_Driver_Model.html#efi-service-binding-protocol) cc ````@nicholasbishop````
2025-03-05Rollup merge of #137463 - sunshowers:illumos-posix-spawn, r=Mark-Simulacrum许杰友 Jieyou Xu (Joe)-4/+19
[illumos] attempt to use posix_spawn to spawn processes illumos has `posix_spawn`, and the very newest versions also have `_addchdir`, so use that. POSIX standardized this function so I also added a weak symbol lookup for the non `_np` version. (illumos has both.) This probably also works on Solaris, but I don't have access to an installation to validate this so I decided to focus on illumos instead. This is a nice ~4x performance improvement for process creation. My go-to as usual is nextest against the clap repo, which acts as a stress test for process creation -- with [this commit]: ```console $ cargo nextest run -E 'not test(ui_tests) and not test(example_tests)' before: Summary [ 1.747s] 879 tests run: 879 passed, 2 skipped after: Summary [ 0.445s] 879 tests run: 879 passed, 2 skipped ``` [this commit]: https://github.com/clap-rs/clap/commit/fde45f9aea766fb8de46e3d46e6575f393c3b6b9
2025-03-05Rollup merge of #137240 - jieyouxu:remove_dir_all, r=Mark-Simulacrum许杰友 Jieyou Xu (Joe)-3/+5
Slightly reformat `std::fs::remove_dir_all` error docs To make the error cases easier to spot on a quick glance, as I've been bitten by this a couple of times already 💀 cc #137230.
2025-03-05Rollup merge of #136798 - pcorwin:master, r=tgross35许杰友 Jieyou Xu (Joe)-0/+34
Added documentation for flushing per #74348 Resolves #74348
2025-03-05Rollup merge of #136662 - thaliaarchi:formatter-pad-char-count, r=m-ou-se许杰友 Jieyou Xu (Joe)-37/+29
Count char width at most once in `Formatter::pad` When both width and precision flags are specified, then `Formatter::pad` counts the character width twice. Instead, record the character width when truncating it to the precision, so it does not need to be recomputed. Simplify control flow so the cases are more clear. Related: - 6c9e708f4be (`fmt::Formatter::pad`: don't call chars().count() more than one time, 2021-09-01): Reduce counting chars from thrice to twice in worst case - ede39aeb331 (feat: reinterpret `precision` field for strings, 2016-06-29): Change meaning of precision for strings - b820748ff5a (Implement formatting arguments for strings and integers, 2013-08-10): Implement `Formatter::pad`
2025-03-05Rollup merge of #134063 - tgross35:dec2flt-refactoring, r=Noratrieb许杰友 Jieyou Xu (Joe)-602/+853
dec2flt: Clean up float parsing modules This is the first portion of my work adding support for parsing and printing `f16`. Changes in `float.rs` replace the magic constants with expressions and add some use of generics to better support the new float types. Everything else is related to documentation or naming; there are no functional changes in this PR. This can be reviewed by commit.
2025-03-05Auto merge of #138031 - workingjubilee:rollup-5bsotpz, r=workingjubileebors-33/+9
Rollup of 15 pull requests Successful merges: - #137829 (Stabilize [T]::split_off... methods) - #137850 (Stabilize `box_uninit_write`) - #137912 (Do not recover missing lifetime with random in-scope lifetime) - #137913 (Allow struct field default values to reference struct's generics) - #137923 (Simplify `<Postorder as Iterator>::size_hint`) - #137949 (Update MSVC INSTALL.md instructions to recommend VS 2022 + recent Windows 10/11 SDK) - #137963 (Add ``dyn`` keyword to `E0373` examples) - #137975 (Remove unused `PpMode::needs_hir`) - #137981 (rustdoc search: increase strictness of typechecking) - #137986 (Fix some typos) - #137991 (Add `avr-none` to SUMMARY.md and platform-support.md) - #137993 (Remove obsolete comment from DeduceReadOnly) - #137996 (Revert "compiler/rustc_data_structures/src/sync/worker_local.rs: delete "unsafe impl Sync"") - #138019 (Pretty-print `#[deprecated]` attribute in HIR.) - #138026 (Make CrateItem::body() function return an option) r? `@ghost` `@rustbot` modify labels: rollup
2025-03-05Revert "Add a test config for __gnu_h2f_ieee and __gnu_f2h_ieee"Trevor Gross-21/+4
This turned out to not be useful, so remove it. This reverts commit b7b93103fb9293c0c502dc1ae34e2ad5c871bc39.
2025-03-05Update `compiler-builtins` to 0.1.151Trevor Gross-4/+4
This enables `f16` builtins for loongarch [1] and adds support for Cygwin [2]. [1]: https://github.com/rust-lang/compiler-builtins/pull/770 [2]: https://github.com/rust-lang/compiler-builtins/pull/774
2025-03-05chore: release v0.1.151github-actions[bot]-1/+10
2025-03-05Add cygwin support王宇逸-21/+27
Co-authored-by: Ookiineko <chiisaineko@protonmail.com>
2025-03-05Enable `f16` for LoongArch (#770)hev-4/+11
[ the configured-out tests should be re-enabled once we have the symbols in nightly - Trevor ]
2025-03-04Rollup merge of #137986 - fuyangpengqi:master, r=AmanieuJubilee-1/+1
Fix some typos Fix some typos
2025-03-04Rollup merge of #137850 - slanterns:box_uninit_write, r=ibraheemdevJubilee-4/+1
Stabilize `box_uninit_write` Closes: https://github.com/rust-lang/rust/issues/129397.
2025-03-04Rollup merge of #137829 - cramertj:stabilize-split-off, r=jhprattJubilee-28/+7
Stabilize [T]::split_off... methods This was previously known as the slice_take feature. Closes #62280
2025-03-04Revert "ci: Pin the nightly toolchain for aarch64-unknown-linux-gnu"Trevor Gross-2/+1
The fix to this issue was synced in [1] so we should no longer need to keep aarch64 pinned. This reverts commit b2bcfc838e2a4b72fa62b333e3eb91f250aa4539. [1]: https://github.com/rust-lang/rust/pull/137661
2025-03-04Add a test config for __gnu_h2f_ieee and __gnu_f2h_ieeeTrevor Gross-4/+21
Some targets do not provide these symbols since they always use __extendhfsf and __truncsfhf. Add a configuration option for this.
2025-03-04Simplify test crate build featuresTrevor Gross-8/+25
Since we have a handful of different float-related configuration in testcrate, track a list of which are implied by others rather than repeating the config.
2025-03-04Rollup merge of #137634 - tgross35:update-builtins, r=tgross35Jubilee-4/+4
Update `compiler-builtins` to 0.1.149 Includes a change to make a subset of math symbols available on all platforms [1], and disables `f16` on aarch64 without neon [2]. [1]: https://github.com/rust-lang/compiler-builtins/pull/763 [2]: https://github.com/rust-lang/compiler-builtins/pull/775 try-job: aarch64-gnu try-job: aarch64-gnu-debug try-job: armhf-gnu try-job: dist-various-1 try-job: dist-various-2 try-job: dist-aarch64-linux try-job: dist-arm-linux try-job: dist-armv7-linux try-job: dist-x86_64-linux try-job: test-various
2025-03-04Add __extendhfdf2 and add __truncdfhf2 testTrevor Gross-2/+47
LLVM doesn't seem to emit this intrinsic but it probably should, in some cases it lowers f16->f64 conversions as f16->f32->f64 with two libcalls. GCC provides this intrinsic so it is good to have anyway. Additionally, add a test for f64->f16 which was missing. [1]: https://rust.godbolt.org/z/xezM9PEnz
2025-03-04Ensure that negative auto impls are always applicableMichael Goulet-1/+0
2025-03-04Added documentation for flushingpcorwin-0/+34
2025-03-04add unstable for faminmaxJames Barford-Evans-8/+8
2025-03-04mark FEAT_FAMINMAX intrinsics as safeJames Barford-Evans-28/+14
2025-03-04armV7 does not need faminmax flagJames Barford-Evans-1/+0
2025-03-04Add faminmax intrinsics to the skip listJames Barford-Evans-0/+6
2025-03-04Add aarch64_unstable_target_feature and relax instruction assertionJames Barford-Evans-10/+12
2025-03-04feat - FEAT_FAMINMAX neon intrinsicsJames Barford-Evans-0/+312
2025-03-04Fix test hangs on AIXHenry Jiang-4/+19
2025-03-04fix unnecessary unsafe error in doctestRalf Jung-0/+1