about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-09-25Auto merge of #147019 - Zalathar:rollup-boxzbmo, r=Zalatharbors-319/+1670
Rollup of 14 pull requests Successful merges: - rust-lang/rust#145067 (RawVecInner: add missing `unsafe` to unsafe fns) - rust-lang/rust#145277 (Do not materialise X in [X; 0] when X is unsizing a const) - rust-lang/rust#145973 (Add `std` support for `armv7a-vex-v5`) - rust-lang/rust#146667 (Add an attribute to check the number of lanes in a SIMD vector after monomorphization) - rust-lang/rust#146735 (unstably constify float mul_add methods) - rust-lang/rust#146737 (f16_f128: enable some more tests in Miri) - rust-lang/rust#146766 (Add attributes for #[global_allocator] functions) - rust-lang/rust#146905 (llvm: update remarks support on LLVM 22) - rust-lang/rust#146982 (Remove erroneous normalization step in `tests/run-make/linker-warning`) - rust-lang/rust#147005 (Small string formatting cleanup) - rust-lang/rust#147007 (Explicitly note `&[SocketAddr]` impl of `ToSocketAddrs`) - rust-lang/rust#147008 (bootstrap.py: Respect build.jobs while building bootstrap tool) - rust-lang/rust#147013 (rustdoc: Fix documentation for `--doctest-build-arg`) - rust-lang/rust#147015 (Use `LLVMDisposeTargetMachine`) r? `@ghost` `@rustbot` modify labels: rollup
2025-09-25Rollup merge of #147015 - Zalathar:dispose-tm, r=lqdStuart Cook-8/+3
Use `LLVMDisposeTargetMachine` After bumping the minimum LLVM version to 20 (rust-lang/rust#145071), we no longer need to run any custom code when disposing of a TargetMachine, so we can just use the upstream LLVM-C function.
2025-09-25Rollup merge of #147013 - fmease:fix-docs-doctest-build-arg, r=GuillaumeGomezStuart Cook-21/+5
rustdoc: Fix documentation for `--doctest-build-arg` In https://github.com/rust-lang/rust/pull/139863, I forgot to update the documentation. Tracking issue: https://github.com/rust-lang/rust/issues/134172
2025-09-25Rollup merge of #147008 - neuschaefer:bootstrap-jobs, r=KobzolStuart Cook-0/+2
bootstrap.py: Respect build.jobs while building bootstrap tool On resource-constrained systems, it is vital to respect the value of build.jobs, in order to avoid overwhelming the available memory.
2025-09-25Rollup merge of #147007 - LawnGnome:tosocketaddrs-doc, r=tgross35Stuart Cook-0/+2
Explicitly note `&[SocketAddr]` impl of `ToSocketAddrs` Although the examples below this list do imply that there's an impl of `ToSocketAddrs` for `&[SocketAddr]`, it's not actually noted in the list of default implementations.
2025-09-25Rollup merge of #147005 - GuillaumeGomez:string-formatting-cleanup, ↵Stuart Cook-5/+3
r=jdonszelmann Small string formatting cleanup This PR is mostly useless. I was going through this file, saw that and corrected it. That's pretty much it. Feel free to close it if it's a bother.
2025-09-25Rollup merge of #146982 - fmease:fix-rmake-linker-warning, r=bjorn3Stuart Cook-1/+0
Remove erroneous normalization step in `tests/run-make/linker-warning` Fixes rust-lang/rust#146977. r? bjorn3 or reassign
2025-09-25Rollup merge of #146905 - durin42:llvm-22-bitstream-remarks, r=nikicStuart Cook-0/+13
llvm: update remarks support on LLVM 22 LLVM change dfbd76bda01e removed separate remark support entirely, but it turns out we can just drop the parameter and everything appears to work fine. Fixes rust-lang/rust#146912 as far as I can tell (the test passes.)
2025-09-25Rollup merge of #146766 - nikic:global-alloc-attr, r=nnethercoteStuart Cook-3/+54
Add attributes for #[global_allocator] functions Emit `#[rustc_allocator]` etc. attributes on the functions generated by the `#[global_allocator]` macro, which will emit LLVM attributes like `"alloc-family"`. If the module with the global allocator participates in LTO, this ensures that the attributes typically emitted on the allocator declarations are not lost if the definition is imported. There is a similar issue when the allocator shim is used, but I've opted not to fix that case in this PR, because doing that cleanly is somewhat gnarly. Related to https://github.com/rust-lang/rust/issues/145995.
2025-09-25Rollup merge of #146737 - RalfJung:f16-f128-miri, r=tgross35Stuart Cook-17/+15
f16_f128: enable some more tests in Miri For some reason, a bunch of tests were disabled in Miri that don't use any fancy intrinsics. Let's enable them. I verified this with `./x miri library/core --no-doc -- float`. r? `@tgross35`
2025-09-25Rollup merge of #146735 - Qelxiros:const_mul_add, r=tgross35,RalfJungStuart Cook-135/+118
unstably constify float mul_add methods Tracking issue: rust-lang/rust#146724 r? `@tgross35`
2025-09-25Rollup merge of #146667 - calebzulawski:simd-mono-lane-limit, r=lcnr,RalfJungStuart Cook-82/+251
Add an attribute to check the number of lanes in a SIMD vector after monomorphization Allows std::simd to drop the `LaneCount<N>: SupportedLaneCount` trait and maintain good error messages. Also, extends rust-lang/rust#145967 by including spans in layout errors for all ADTs. r? ``@RalfJung`` cc ``@workingjubilee`` ``@programmerjake``
2025-09-25Rollup merge of #145973 - vexide:vex-std, r=tgross35Stuart Cook-10/+1012
Add `std` support for `armv7a-vex-v5` This PR adds standard library support for the VEX V5 Brain (`armv7a-vex-v5` target). It is more-or-less an updated version of the library-side work done in rust-lang/rust#131530. This was a joint effort between me, `@lewisfm,` `@max-niederman,` `@Gavin-Niederman` and several other members of the [`vexide` project](https://github.com/vexide/). ## Background VEXos is a fairly unconventional operating system, with user code running in a restricted enviornment with regards to I/O capabilities and whatnot. As such, several OS-dependent APIs are unsupported or have partial support (such as `std::net`, `std::process`, and most of `std::thread`). A more comprehensive list of what does or doesn't work is outlined in the [updated target documentation](https://github.com/vexide/rust/blob/vex-std/src/doc/rustc/src/platform-support/armv7a-vex-v5.md). Despite these limitations, we believe that `libstd` support on this target still has value to users, especially given the popular use of this hardware for educational purposes. For some previous discussion on this matter, see [this comment](https://github.com/rust-lang/rust/pull/131530#issuecomment-2432856841). ## SDK Linkage VEXos doesn't really ship with an official `libc` or POSIX-style platform API (and though it does port newlib, these are stubbed on top of the underlying SDK). Instead, VEX provides their own SDK for calling platform APIs. Their official SDK is kept proprietary (with public headers), though open-source implementations exist. Following the precedent of the `armv6k-nintendo-3ds` team's work in rust-lang/rust#95897, we've opted not to directly link `libstd` to any SDK with the expectation that users will provide their own with one of the following options: - [`vex-sdk-download`](https://github.com/vexide/vex-sdk/tree/main/packages/vex-sdk-download), which downloads an official proprietary SDK from VEX using a build script. - [`vex-sdk-jumptable`](https://crates.io/crates/vex-sdk-jumptable), which is a compatible, open-source reimplementation of the SDK using firmware jumps. - [`vex-sdk-pros`](https://github.com/vexide/vex-sdk/tree/main/packages/vex-sdk-pros), which uses the [PROS kernel](https://github.com/purduesigbots/pros) as a provider for SDK functions. - Linking their own implementation or stubbing the functions required by libstd. The `vex-sdk` crate used in the VEXos PAL provides `libc`-style FFI bindings for any compatible system library, so any of these options *should* work fine. A functional demo project using `vex-sdk-download` can be found [here](https://github.com/vexide/armv7a-vex-v5-demo/tree/main). ## Future Work This PR implements virtually everything we are currently able to implement given the current capabilities of the platform. The exception to this is file directory enumeration, though the implementation of that is sufficiently [gross enough](https://github.com/vexide/vexide/blob/c6c5bad11e035cf4e51d429dca7e427210185ed4/packages/vexide-core/src/fs/mod.rs#L987) to drive us away from supporting this officially. Additionally, I have a working branch implementing the `panic_unwind` runtime for this target, which is something that would be nice to see in the future, though given the volume of compiler changes i've deemed it out-of-scope for this PR.
2025-09-25Rollup merge of #145277 - dingxiangfei2009:fold-coercion-into-const, ↵Stuart Cook-1/+69
r=nnethercote Do not materialise X in [X; 0] when X is unsizing a const Fix rust-lang/rust#143671 It turns out that MIR builder materialise `X` in `[X; 0]` into a temporary local when `X` is unsizing a `const`. This led to a confusing call to destructor of `X` when such a destructor is declared. [Playground](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2024&gist=8dfc933af89efeb89c881bc77498ba63) This patch may miss out other cases that we should avoid materialisation in case of `[X; 0]`. Suggestions to include is most welcome!
2025-09-25Rollup merge of #145067 - btj:patch-3, r=tgross35Stuart Cook-36/+123
RawVecInner: add missing `unsafe` to unsafe fns Some (module-private) functions in `library/alloc/src/raw_vec/mod.rs` are unsafe (i.e. may cause UB when called from safe code) but are not marked `unsafe`. Specifically: - `RawVecInner::grow_exact` causes UB if called with `len` and `additional` arguments such that `len + additional` is less than the current capacity. Indeed, in that case it calls [Allocator::grow](https://doc.rust-lang.org/std/alloc/trait.Allocator.html#method.grow) with a `new_layout` that is smaller than `old_layout`, which violates a safety precondition. - The RawVecInner methods for resizing the buffer cause UB if called with an `elem_layout` different from the one used to initially allocate the buffer, because in that case `Allocator::grow` or `Allocator::shrink` are called with an `old_layout` that does not *fit* the allocated block, which violates a safety precondition. - `RawVecInner::current_memory` might cause UB if called with an `elem_layout` different from the one used to initially allocate the buffer, because the `unchecked_mul` might overflow. - Furthermore, these methods cause UB if called with an `elem_layout` where the size is not a multiple of the alignment. This is because `Layout::repeat` is used (in `layout_array`) to compute the allocation's layout when allocating, which includes padding to ensure alignment of array elements, but simple multiplication is used (in `current_memory`) to compute the old allocation's layout when resizing or deallocating, which would cause the layout used to resize or deallocate to not *fit* the allocated block, which violates a safety precondition. I discovered these issues while performing formal verification of `library/alloc/src/raw_vec/mod.rs` per [Challenge 19](https://model-checking.github.io/verify-rust-std/challenges/0019-rawvec.html) of the [AWS Rust Standard Library Verification Contest](https://aws.amazon.com/blogs/opensource/verify-the-safety-of-the-rust-standard-library/).
2025-09-25Auto merge of #147003 - matthiaskrgr:rollup-b5z9uiz, r=matthiaskrgrbors-86/+108
Rollup of 7 pull requests Successful merges: - rust-lang/rust#146556 (Fix duration_since panic on unix when std is built with integer overflow checks) - rust-lang/rust#146679 (Clarify Display for error should not include source) - rust-lang/rust#146753 (Improve the pretty print of UnstableFeature clause) - rust-lang/rust#146894 (Improve derive suggestion of const param) - rust-lang/rust#146950 (core: simplify `CStr::default()`) - rust-lang/rust#146958 (Fix infinite recursion in Path::eq with String) - rust-lang/rust#146971 (fix ICE in writeback due to bound regions) r? `@ghost` `@rustbot` modify labels: rollup
2025-09-25bootstrap.py: Respect build.jobs while building bootstrap toolJ. Neuschäfer-0/+2
On resource-constrained systems, it is vital to respect the value of build.jobs, in order to avoid overwhelming the available memory.
2025-09-25Use `LLVMDisposeTargetMachine`Zalathar-8/+3
2025-09-25rustdoc: Fix documentation for `--doctest-build-arg`León Orell Valerian Liehr-21/+5
2025-09-25Auto merge of #146981 - weihanglo:update-cargo, r=weihanglobors-0/+0
Update cargo submodule 17 commits in 966f94733bbc94ca51ff9f1e4c49ad250ebbdc50..f2932725b045d361ff5f18ba02b1409dd1f44e71 2025-09-16 17:24:45 +0000 to 2025-09-24 11:31:26 +0000 - fix: use `host-tuple` for host target subsitution (rust-lang/cargo#16003) - test(build-std): move away from panic_immediate_abort (rust-lang/cargo#16006) - fix: Sparse URLs in `TomlLockfileSourceId` (rust-lang/cargo#15990) - refactor(gctx): extract toml dotted keys validation (rust-lang/cargo#15998) - feat: Add lint for global use of `hint-mostly-unused` (rust-lang/cargo#15995) - Make GlobalContext Sync (rust-lang/cargo#15967) - chore(deps): update cargo-semver-checks to v0.44.0 (rust-lang/cargo#15993) - fix(frontatter): Only allow horizontal whitespace after fences (rust-lang/cargo#15975) - docs: Add Lockfile schemas docs (rust-lang/cargo#15989) - Add parallel frontend to the build performance guide (rust-lang/cargo#15970) - chore(deps): update msrv (3 versions) to v1.88 (rust-lang/cargo#15988) - chore(deps): update msrv (1 version) to v1.90 (rust-lang/cargo#15984) - feat(cargo-util-schemas): Move lockfile schemas (rust-lang/cargo#15980) - Clarify multiple version requirement behavior (rust-lang/cargo#15979) - Adds ghostty as supported terminal for term integration (OSC 9;4) (rust-lang/cargo#15977) - docs(team): Fixed broken office hours link (rust-lang/cargo#15976) - docs: Clarify git sources vs git registries in source replacement documentation (rust-lang/cargo#15974) r? ghost
2025-09-25Remove an erroneous normalization step in `tests/run-make/linker-warning`León Orell Valerian Liehr-1/+0
2025-09-24llvm: add a destructor to call releaseSerializerJosh Stone-0/+8
2025-09-24Explicitly note `&[SocketAddr]` impl of `ToSocketAddrs`.Adam Harvey-0/+2
Although the examples below this list do imply that there's an impl of `ToSocketAddrs` for `&[SocketAddr]`, it's not actually noted in the list of default implementations.
2025-09-24Small string formatting cleanupGuillaume Gomez-5/+3
2025-09-24Rollup merge of #146971 - lcnr:fix-writeback, r=BoxyUwUMatthias Krüger-32/+21
fix ICE in writeback due to bound regions fixes rust-lang/rust#117808 r? `@BoxyUwU`
2025-09-24Rollup merge of #146958 - el-ev:fix_path_string_eq_recurse, r=joboetMatthias Krüger-9/+19
Fix infinite recursion in Path::eq with String - Closes [after beta backport] rust-lang/rust#146940
2025-09-24Rollup merge of #146950 - joboet:cstr_default, r=tgross35Matthias Krüger-8/+3
core: simplify `CStr::default()` Just use a `CStr`-literal...
2025-09-24Rollup merge of #146894 - tiif:suggest_feature_attr, r=BoxyUwUMatthias Krüger-11/+14
Improve derive suggestion of const param Make the suggestion not to remove the adt and use the name of the adt variant in the diagnostic. r? `@BoxyUwU`
2025-09-24Rollup merge of #146753 - tiif:unsatisfiable-unstable-feature, r=BoxyUwUMatthias Krüger-8/+7
Improve the pretty print of UnstableFeature clause As per https://github.com/rust-lang/rust/pull/145095#discussion_r2349439492, we could make the diagnostic for unsatisfiable ``UnstableFeature`` clause better. r? `@BoxyUwU`
2025-09-24Rollup merge of #146679 - stepancheg:error-display-source, r=dtolnayMatthias Krüger-1/+7
Clarify Display for error should not include source Fixes rust-lang/rust#145561. r? `@Noratrieb`
2025-09-24Rollup merge of #146556 - stepancheg:repro-146228, r=tgross35Matthias Krüger-17/+37
Fix duration_since panic on unix when std is built with integer overflow checks Add a test for regression rust-lang/rust#146228, and turns out this test fails detects error when std is compiled with integer overflow checks. Original regression was reverted in rust-lang/rust#146473. First attempt to fix was in rust-lang/rust#146247; test and some code is copied from there, thanks `@eval-exec` r? `@RalfJung`
2025-09-24Repro duration_since regression from issue 146228Stepan Koltsov-17/+37
2025-09-24unstably constify float mul_add methodsJeremy Smart-135/+118
Co-authored-by: Ralf Jung <post@ralfj.de>
2025-09-24Clarify Display for error should not include sourceStepan Koltsov-1/+7
2025-09-24Auto merge of #146999 - matthiaskrgr:rollup-0gbkm82, r=matthiaskrgrbors-114/+385
Rollup of 8 pull requests Successful merges: - rust-lang/rust#146711 (fix 2 borrowck issues) - rust-lang/rust#146857 (revert change removing `has_infer` check. Commit conservatively patch…) - rust-lang/rust#146897 (fix ICE in rustdoc::invalid_html_tags) - rust-lang/rust#146915 (Make missed precondition-free float intrinsics safe) - rust-lang/rust#146932 (Switch next-solver related rustc dependencies of r-a to crates.io ones) - rust-lang/rust#146959 (temporary-lifetime-extension-tuple-ctor.rs: make usable on all editions) - rust-lang/rust#146964 (library: std: sys: pal: uefi: Add some comments) - rust-lang/rust#146969 (const-eval: better wording for errors involving maybe-null pointers) r? `@ghost` `@rustbot` modify labels: rollup
2025-09-24Rollup merge of #146969 - RalfJung:maybe-null-errors, r=oli-obkMatthias Krüger-46/+153
const-eval: better wording for errors involving maybe-null pointers Fixes https://github.com/rust-lang/rust/issues/146748 r? ``@oli-obk``
2025-09-24Rollup merge of #146964 - Ayush1325:close-protocol, r=joboetMatthias Krüger-0/+4
library: std: sys: pal: uefi: Add some comments I seemed to have forgotten that since I am using GET_PROTOCOL attribute for the std usecases, I did not need to close the protocols explicitly. So adding these comments as a note to future self not to waste time on the same thing again.
2025-09-24Rollup merge of #146959 - tshepang:patch-2, r=nnethercoteMatthias Krüger-3/+3
temporary-lifetime-extension-tuple-ctor.rs: make usable on all editions Also - add Reference id - fix typo
2025-09-24Rollup merge of #146932 - ShoyuVanilla:ra-in-tree-hack, r=lcnrMatthias Krüger-40/+5
Switch next-solver related rustc dependencies of r-a to crates.io ones r? ``@ghost`` cc ``@lnicola`` ``@lcnr``
2025-09-24Rollup merge of #146915 - clarfonthey:safe-intrinsics-2, r=RalfJungMatthias Krüger-20/+22
Make missed precondition-free float intrinsics safe So, in my defence, these were both separated out from the other intrinsics in the file *and* had a different safety comment in the stable versions, so, I didn't notice them before. But, in my offence, the entire reason I did the previous PR was because I was using them for SIMD intrinsic fallbacks, and `fabs` is needed for those too, so, I don't really have an excuse. Extra follow-up to rust-lang/rust#146683. r? ```@RalfJung``` who reviewed the previous one These don't appear to be used anywhere outside of the standard locations, at least.
2025-09-24Rollup merge of #146897 - lolbinarycat:rustdoc-invalid_html_tags-ice-146890, ↵Matthias Krüger-1/+65
r=GuillaumeGomez fix ICE in rustdoc::invalid_html_tags fixes https://github.com/rust-lang/rust/issues/146890 r? ```@GuillaumeGomez```
2025-09-24Rollup merge of #146857 - tnuha:revert_self_has_no_region_infer, r=lcnrMatthias Krüger-1/+36
revert change removing `has_infer` check. Commit conservatively patch… …es for now, but more development proceeding. Hotfix for rust-lang/rust#146852.
2025-09-24Rollup merge of #146711 - lcnr:fix-placeholder-ice, r=lqdMatthias Krüger-3/+97
fix 2 borrowck issues fixes https://github.com/rust-lang/rust/issues/146467 cc ``@amandasystems`` our understanding here is as follows: region constraints from computing implied bounds gets `ConstraintCategory::Internal`. If there's a higher-ranked subtyping errors while computing implied bounds we then ended up with only `ConstraintCategory::Internal` and `ConstraintCategory::OutlivesUnnameablePlaceholder(_)` constraints. The path was something like - `'placeholderU2: 'placeholderU1` (`Internal`) - `'placeholderU1: 'static` (`OutlivesUnnameablePlaceholder('placeholderU2)`) It's generally somewhat subtle here as ideally relating placeholders doesn't introduce `'static` constraints. Relating the placeholders themselves will always error regardless, cc https://github.com/rust-lang/rust/pull/142623. --- separately fixes https://github.com/rust-lang/rust/pull/145925#issuecomment-3303733357 by updating the location for deferred closure requirements inside of promoteds. I am not updating their category as doing so is 1) effort and 2) imo actually undesirable :thinking: see the comments in `TypeChecker::check_promoted` cc ``@lqd`` r? lqd
2025-09-25mark THIR use as candidate for constness checkDing Xiang Fei-1/+12
2025-09-25add test fixture for newly allowed const exprDing Xiang Fei-0/+8
Signed-off-by: Ding Xiang Fei <dingxiangfei2009@protonmail.ch> Co-authored-by: Theemathas Chirananthavat <theemathas@gmail.com>
2025-09-25do not materialise X in [X; 0] when X is unsizing a constDing Xiang Fei-1/+50
2025-09-24std: add support for armv7a-vex-v5 targetTropical-10/+1012
Co-authored-by: Lewis McClelland <lewis@lewismcclelland.me>
2025-09-24Improve the pretty print of UnstableFeature clausetiif-8/+7
2025-09-24f16_f128: enable some more tests in MiriRalf Jung-17/+15
2025-09-24Update cargo submoduleWeihang Lo-0/+0