about summary refs log tree commit diff
path: root/library
AgeCommit message (Collapse)AuthorLines
2025-06-17library: Increase timeout on mpmc test to reduce flakesJubilee Young-2/+2
This recently spuriously failed in a rollup, so I think we can afford to increase the base timeout and the amount of time slept for to provide a much wider margin for the timeout to be reached.
2025-06-17Rollup merge of #142620 - a1phyr:borrowed_buf_remove_branch, r=jhprattJacob Pratt-3/+3
Remove a panicking branch in `BorrowedCursor::advance`
2025-06-17Rollup merge of #142520 - hkBst:less-static-mut, r=tgross35Jacob Pratt-106/+55
alloc: less static mut + some cleanup I'm looking into https://github.com/rust-lang/rust/issues/125035 and would like some feedback on my approach.
2025-06-17Rollup merge of #142517 - ChrisDenton:anon-pipe, r=Mark-SimulacrumJacob Pratt-86/+142
Windows: Use anonymous pipes in Command When setting `Stdio::pipe` on `Command` we want to create an anonymous pipe that can be used asynchronously (at least on our end). Usually we'd use [`CreatePipe`](https://learn.microsoft.com/en-us/windows/win32/api/namedpipeapi/nf-namedpipeapi-createpipe) to open anonymous pipes but unfortunately it opens pipes for synchronous access. The alternative is to use [`CreateNamedPipeW`](https://learn.microsoft.com/en-us/windows/win32/api/namedpipeapi/nf-namedpipeapi-createnamedpipew) which does allow asynchronous access but that requires giving a file name to the pipe. So we currently have this awful hack where we attempt to emulate anonymous pipes using `CreateNamedPipeW` by attempting to create a unique name and looping until we find one that doesn't already exist. The better option is to use the lower level [`NtCreateNamedPipeFile`](https://learn.microsoft.com/en-us/windows/win32/devnotes/nt-create-named-pipe-file) (which is used internally by both `CreatePipe` and `CreateNamedPipeW`). This function wasn't documented until a few years ago but now that it is it's ok for us to use it. try-job: *msvc* try-job: *mingw*
2025-06-17Rollup merge of #141608 - moatom:proc_macro-140238, r=dtolnayJacob Pratt-4/+327
Add support for repetition to `proc_macro::quote` Progress toward: rust-lang/rust#140238
2025-06-17Rollup merge of #141574 - fee1-dead-contrib:push-owzulzmzszzx, r=jhprattJacob Pratt-0/+7
impl `Default` for `array::IntoIter` cc rust-lang/rust#91583 my personal use of this feature comes from https://github.com/fee1-dead/w/blob/092db5df631ea515b688bae99c7f02eef12d7221/src/cont.rs#L154-L170 insta-stable, but I feel like this is small enough to _not_ require an ACP (but a FCP per https://forge.rust-lang.org/libs/maintaining-std.html#when-theres-new-trait-impls)? feel free to correct me if I am wrong.
2025-06-17Testsatiscugcat-17/+14
2025-06-17Ran cargo fmt, removed unexpected charactersatiscugcat-28/+25
2025-06-17Moved const fn outside unsafe blocksatiscugcat-11/+13
2025-06-17Changed implementation of _mm{256,512}_alignr_epi8 to match that of ↵satiscugcat-350/+149
_mm_alignr_epi8 in ssse3.rs, also removed the import of the unreachable unchecked hint as it was no longer necessary
2025-06-17Changed implementation of bsrli in avx512.rs to match that of bslli, fixing ↵satiscugcat-195/+78
a bug in the process.
2025-06-17Changed the implementation of bsrli to match bslli in avx2 intrinsicssatiscugcat-132/+46
2025-06-17Fixing mistake in previous commitAniket Mishra-1/+1
2025-06-17Removal of redundant mod operation in _mm256_alignr_epi8Aniket Mishra-1/+1
2025-06-17Fix in erroneous implementation of _mm256_bsrli_epi128Aniket Mishra-1/+1
Fixing the issue mentioned in issue #1822 of rust-lang/stdarch.
2025-06-17Add triagebot config for subtree syncsJakub Beránek-0/+10
Adds checking of PR descriptions to avoid relative issue links (without repository prefix) and mentions in commits.
2025-06-17Auto merge of #142613 - workingjubilee:rollup-yuod2hg, r=workingjubileebors-56/+62
Rollup of 13 pull requests Successful merges: - rust-lang/rust#138538 (Make performance description of String::{insert,insert_str,remove} more precise) - rust-lang/rust#141946 (std: refactor explanation of `NonNull`) - rust-lang/rust#142216 (Miscellaneous RefCell cleanups) - rust-lang/rust#142542 (Manually invalidate caches in SimplifyCfg.) - rust-lang/rust#142563 (Refine run-make test ignores due to unpredictable `i686-pc-windows-gnu` unwind mechanism) - rust-lang/rust#142570 (Reject union default field values) - rust-lang/rust#142584 (Handle same-crate macro for borrowck semicolon suggestion) - rust-lang/rust#142585 (Update books) - rust-lang/rust#142586 (Fold unnecessary `visit_struct_field_def` in AstValidator) - rust-lang/rust#142587 (Make sure to propagate result from `visit_expr_fields`) - rust-lang/rust#142595 (Revert overeager warning for misuse of `--print native-static-libs`) - rust-lang/rust#142598 (Set elf e_flags on ppc64 targets according to abi) - rust-lang/rust#142601 (Add a comment to `FORMAT_VERSION`.) r? `@ghost` `@rustbot` modify labels: rollup
2025-06-17Update libc to 0.2.174Trevor Gross-2/+2
This includes a fix for building on gnux32. [1]: https://github.com/rust-lang/libc/releases/tag/0.2.174
2025-06-17Auto merge of #137944 - davidtwco:sized-hierarchy, r=oli-obkbors-196/+294
Sized Hierarchy: Part I This patch implements the non-const parts of rust-lang/rfcs#3729. It introduces two new traits to the standard library, `MetaSized` and `PointeeSized`. See the RFC for the rationale behind these traits and to discuss whether this change makes sense in the abstract. These traits are unstable (as is their constness), so users cannot refer to them without opting-in to `feature(sized_hierarchy)`. These traits are not behind `cfg`s as this would make implementation unfeasible, there would simply be too many `cfg`s required to add the necessary bounds everywhere. So, like `Sized`, these traits are automatically implemented by the compiler. RFC 3729 describes changes which are necessary to preserve backwards compatibility given the introduction of these traits, which are implemented and as follows: - `?Sized` is rewritten as `MetaSized` - `MetaSized` is added as a default supertrait for all traits w/out an explicit sizedness supertrait already. There are no edition migrations implemented in this, as these are primarily required for the constness parts of the RFC and prior to stabilisation of this (and so will come in follow-up PRs alongside the const parts). All diagnostic output should remain the same (showing `?Sized` even if the compiler sees `MetaSized`) unless the `sized_hierarchy` feature is enabled. Due to the use of unstable extern types in the standard library and rustc, some bounds in both projects have had to be relaxed already - this is unfortunate but unavoidable so that these extern types can continue to be used where they were before. Performing these relaxations in the standard library and rustc are desirable longer-term anyway, but some bounds are not as relaxed as they ideally would be due to the inability to relax `Deref::Target` (this will be investigated separately). It is hoped that this is implemented such that it could be merged and these traits could exist "under the hood" without that being observable to the user (other than in any performance impact this has on the compiler, etc). Some details might leak through due to the standard library relaxations, but this has not been observed in test output. **Notes:** - Any commits starting with "upstream:" can be ignored, as these correspond to other upstream PRs that this is based on which have yet to be merged. - This best reviewed commit-by-commit. I've attempted to make the implementation easy to follow and keep similar changes and test output updates together. - Each commit has a short description describing its purpose. - This patch is large but it's primarily in the test suite. - I've worked on the performance of this patch and a few optimisations are implemented so that the performance impact is neutral-to-minor. - `PointeeSized` is a different name from the RFC just to make it more obvious that it is different from `std::ptr::Pointee` but all the names are yet to be bikeshed anyway. - `@nikomatsakis` has confirmed [that this can proceed as an experiment from the t-lang side](https://rust-lang.zulipchat.com/#narrow/channel/435869-project-goals/topic/SVE.20and.20SME.20on.20AArch64.20.28goals.23270.29/near/506196491) - FCP in https://github.com/rust-lang/rust/pull/137944#issuecomment-2912207485 Fixes rust-lang/rust#79409. r? `@ghost` (I'll discuss this with relevant teams to find a reviewer)
2025-06-17Remove a panicking branch in `BorrowedCursor::advance`Benoît du Garreau-3/+3
2025-06-17Rollup merge of #142216 - nealsid:refcell-logging, r=tgross35Jubilee-36/+30
Miscellaneous RefCell cleanups - Clarify `RefCell` error messages when borrow rules are broken - Remove `Debug` impl for `BorrowError`/`BorrowMutError` since `#derive(Debug)` provides identical functionality - Rename `BorrowFlag` to `BorrowCounter`
2025-06-17Rollup merge of #141946 - xizheyin:141933, r=jhprattJubilee-11/+16
std: refactor explanation of `NonNull` Fixes rust-lang/rust#141933 I cut out the excessive explanation and used an example to explain how to maintain invariance, but I think what is quoted in the *rust reference* in the document needs to be added with a more layman's explanation and example. (I'm not sure if I deleted too much) r? `@workingjubilee`
2025-06-17Rollup merge of #138538 - hkBst:patch-4, r=tgross35Jubilee-9/+16
Make performance description of String::{insert,insert_str,remove} more precise
2025-06-17linked_list tests: buff check_linksMarijn Schouten-40/+25
2025-06-17Make performance of String::insert_str more preciseMarijn Schouten-9/+16
2025-06-16lint: don't consider sizedness in upcastable lintDavid Wood-1/+0
Adding a sizedness supertrait shouldn't require multiple vtables so shouldn't be linted against.
2025-06-16library/compiler: add `PointeeSized` boundsDavid Wood-195/+257
As core uses an extern type (`ptr::VTable`), the default `?Sized` to `MetaSized` migration isn't sufficient, and some code that previously accepted `VTable` needs relaxed to continue to accept extern types. Similarly, the compiler uses many extern types in `rustc_codegen_llvm` and in the `rustc_middle::ty::List` implementation (`OpaqueListContents`) some bounds must be relaxed to continue to accept these types. Unfortunately, due to the current inability to relax `Deref::Target`, some of the bounds in the standard library are forced to be stricter than they ideally would be.
2025-06-16Rollup merge of #142562 - tgross35:update-backtrace, r=workingjubileeJakub Beránek-0/+0
Update the `backtrace` submodule Pick up the following pull requests: * ci: remove binary size check (not relevant in rust-lang/rust) <https://github.com/rust-lang/backtrace-rs/pull/710> * Upgrade `ruzstd`, `object`, and `addr2line` to the latest versions <https://github.com/rust-lang/backtrace-rs/pull/718>
2025-06-16Change __rust_no_alloc_shim_is_unstable to be a functionDaniel Paoliello-3/+4
2025-06-17Add support for repetition to `proc_macro::quote`Tomoaki Kobayashi-4/+327
2025-06-16Rename BorrowFlag type to BorrowCounterNeal-12/+12
It's actually used as a counter so update the name to reflect that.
2025-06-16Two changes: Have BorrowError & BorrowMutError derive Debug and addNeal-24/+18
more information to Display implementation for BorrowError/BorrowMutError - The BorrowError/BorrowMutError Debug implementations do not print anything differently from what the derived implementation does, so we don't need it. - This change also adds the location field of BorrowError/BorrowMutError to the the Display output when it is present, rewords the error message, and uses the Display trait for outputting the error message instead of Debug.
2025-06-16trait_sel: `{Meta,Pointee}Sized` on `Sized` typesDavid Wood-1/+38
Introduce the `MetaSized` and `PointeeSized` traits as supertraits of `Sized` and initially implement it on everything that currently implements `Sized` to isolate any changes that simply adding the traits introduces.
2025-06-16Rollup merge of #142373 - m-ou-se:debug-for-location, r=tgross35Jakub Beránek-1/+20
Fix Debug for Location Fixes https://github.com/rust-lang/rust/issues/142279
2025-06-16Rollup merge of #142236 - yotamofek:pr/std/pathbuf-extend-docs, r=tgross35Jakub Beránek-0/+27
Add documentation for `PathBuf`'s `FromIterator` and `Extend` impls I think it's not very obvious that `PathBuf`'s `Extend` and `FromIterator` impls work like `PathBuf::push`, so I think these should be documented. I'm not very happy with the wording and examples, open to suggestions :)
2025-06-16Rollup merge of #142125 - cberner:file_lock_stable, r=ChrisDentonJakub Beránek-15/+10
Stabilize "file_lock" feature Closes https://github.com/rust-lang/rust/issues/130994 r? ```@joshtriplett```
2025-06-16Extend num tests on `usize` and `isize` as wellGuillaume Gomez-0/+4
2025-06-16Specialize `ToString` implementation on `u128` and `i128`Guillaume Gomez-15/+14
2025-06-16Implement `_fmt` on `u128`Guillaume Gomez-94/+107
2025-06-16Add documentation for `PathBuf`'s `FromIterator` and `Extend` implsYotam Ofek-0/+27
2025-06-16Set MSG_NOSIGNAL for UnixSteamMichał Łowicki-1/+36
https://github.com/rust-lang/rust/issues/139956 fix
2025-06-16Update the `backtrace` submoduleTrevor Gross-0/+0
Pick up the following pull requests: * ci: remove binary size check (not relevant in rust-lang/rust) <https://github.com/rust-lang/backtrace-rs/pull/710> * Upgrade `ruzstd`, `object`, and `addr2line` to the latest versions <https://github.com/rust-lang/backtrace-rs/pull/718>
2025-06-16linked_list tests: less static mutMarijn Schouten-66/+30
2025-06-16Test Debug for Location.Mara Bos-0/+8
2025-06-16Handle win32 separator & prefixes for cygwin paths王宇逸-173/+772
2025-06-15Rollup merge of #133952 - bjorn3:remove_wasm_legacy_abi, r=alexcrichtonLeón Orell Valerian Liehr-3/+0
Remove wasm legacy abi Closes https://github.com/rust-lang/rust/issues/122532 Closes https://github.com/rust-lang/rust/issues/138762 Fixes https://github.com/rust-lang/rust/issues/71871 https://github.com/rust-lang/rust/issues/88152 Fixes https://github.com/rust-lang/rust/issues/115666 Fixes https://github.com/rust-lang/rust/issues/129486
2025-06-15small iter.intersperse.fold() optimizationThe 8472-1/+10
No need to call into fold when the first item is already None, this avoids some redundant work for empty iterators. "But it uses Fuse" one might want to protest, but Fuse is specialized and may call into the inner iterator anyway.
2025-06-15Get rid of `EscapeDebugInner`.Markus Reiter-92/+210
2025-06-15Windows: Use anonymous pipes in CommandChris Denton-86/+142
2025-06-15Stabilize "file_lock" featureChristopher Berner-15/+10