about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-08-22Rollup merge of #144897 - fee1-dead-contrib:raw_lifetimes_printing, r=fmeaseJacob Pratt-73/+192
print raw lifetime idents with r# This replaces rust-lang/rust#143185 and fixes rust-lang/rust#143150 cc ``@fmease``
2025-08-22Rollup merge of #144648 - connortsui20:nonpoison_rwlock, r=Mark-SimulacrumJacob Pratt-752/+1996
Implementation: `#[feature(nonpoison_rwlock)]` Tracking Issue: https://github.com/rust-lang/rust/issues/134645 This PR continues the effort made in https://github.com/rust-lang/rust/pull/144022 by adding the implementation of `nonpoison::rwlock`. Many of the changes here are similar to the changes made to implement `nonpoison::mutex`. The only real difference is that this PR includes a reorganizing of the existing `poison::rwlock` file that hopefully makes both variants more readable. ### Related PRs - `nonpoison_condvar` implementation: https://github.com/rust-lang/rust/pull/144651 - `nonpoison_once` implementation: https://github.com/rust-lang/rust/pull/144653
2025-08-22Rollup merge of #142185 - saethlin:refprop-moves, r=cjgillotJacob Pratt-88/+194
Convert moves of references to copies in ReferencePropagation This is a fix for https://github.com/rust-lang/rust/issues/141101. The root cause of this miscompile is that the SsaLocals analysis that MIR transforms use is supposed to detect locals that are only written to once, in their single assignment. But that analysis is subtly wrong; it does not consider `Operand::Move` to be a write even though the meaning ascribed to `Operand::Move` (at least as a function parameter) by Miri is that the callee may have done arbitrary writes to the caller's Local that the Operand wraps (because `Move` is pass-by-pointer). So Miri conwiders `Operand::Move` to be a write but both the MIR visitor system considers it a read, and so does SsaLocals. I have tried fixing this by changing the `PlaceContext` that is ascribed to an `Operand::Move` to a `MutatingUseContext` but that seems to have borrow checker implications, and changing SsaLocals seems to have wide-ranging regressions in MIR optimizations. So instead of doing those, this PR adds a new kludge to ReferencePropagation, which follows the same line of thinking as the kludge in CopyProp that solves this same problem inside that pass: https://github.com/rust-lang/rust/blob/a5584a8fe16037dc01782064fa41424a6dbe9987/compiler/rustc_mir_transform/src/copy_prop.rs#L65-L98
2025-08-22Rollup merge of #137457 - JayAndJef:issue-132802-fix, r=KobzolJacob Pratt-3/+43
Fix host code appearing in Wasm binaries This is a direct fix for issue [132802](https://github.com/rust-lang/rust/issues/132802). Followed the outline as follows: > * give a hard error in bootstrap when using gcc to compile for wasm > * change our CI to use clang instead of gcc > * add a test that compiling a sample program for wasm32-unknown doesn't give any linker warnings The `test-various` ci job was also changed. try-job: test-various try-job: dist-various-1 try-job: dist-various-2 try-job: x86_64-msvc-1
2025-08-22Rollup merge of #137396 - compiler-errors:param-default, r=fmeaseJacob Pratt-2/+44
Recover `param: Ty = EXPR` Fixes #137310 Pretty basic recovery here, but better than giving an unexpected token error.
2025-08-22Rollup merge of #132087 - ijchen:issue-131770-fix, r=dtolnayJacob Pratt-3/+11
Fix overly restrictive lifetime in `core::panic::Location::file` return type Fixes #131770 by relaxing the lifetime to match what's stored in the struct. See that issue for more details and discussion. Since this is a breaking change, I think a crater run is in order. Since this change should only have an effect at compile-time, I think just a check run is sufficient.
2025-08-22Auto merge of #145494 - cjgillot:span-decode-once, r=lqdbors-10/+9
Only unpack span data once to compute end_point and next_point. Split from https://github.com/rust-lang/rust/pull/144930
2025-08-22Recover param: Ty = EXPRMichael Goulet-2/+44
2025-08-22Auto merge of #145352 - Shourya742:2025-08-12-remove-default-config, r=Kobzolbors-563/+527
Remove default config from bootstrap This PR removes the default config initialization from parse_inner, as it introduced many assumptions during config setup. Instead, each variable is now manually initialized to eliminate certain invariants in parse_inner and streamline the process. r? `@Kobzol`
2025-08-22Auto merge of #145749 - flip1995:clippy-subtree-update, r=Manishearthbors-1050/+1823
Clippy subtree update r? `@Manishearth`
2025-08-22Merge commit '877967959ae8da9814df4f2614971f4d784bf53f' into ↵Philipp Krones-1050/+1823
clippy-subtree-update
2025-08-22Rustup (#15531)Philipp Krones-305/+430
Letting rustbot assign a reviewer, so that someone can double check 9de86f40d7e1a2cbcc308e39fdbc7447d691c527. changelog: none
2025-08-22Bump nightly version -> 2025-08-22Philipp Krones-2/+2
2025-08-22Dogfood fixesPhilipp Krones-115/+114
2025-08-22Ignore unexpected_cfgs warning for bootstrapPhilipp Krones-0/+4
2025-08-22Merge remote-tracking branch 'upstream/master' into rustupPhilipp Krones-959/+1657
2025-08-22Auto merge of #144689 - JonathanBrouwer:share_parse_path, r=jdonszelmannbors-519/+665
Rewrite the new attribute argument parser Fixes https://github.com/rust-lang/rust/issues/143940 This rewrites the parser, should improve performance and maintainability. This can be reviewed commit by commit
2025-08-22Sort Config fields and remove some `mut`s from bindingsJakub Beránek-198/+210
2025-08-22Fix`unnecessary_safety_comment` does not lint for the first line (#15354)Philipp Krones-8/+75
Closes rust-lang/rust-clippy#14553 Closes rust-lang/rust-clippy#14554 changelog: [`unnecessary_safety_comment`] fix FN for the first line in file
2025-08-22Auto merge of #145358 - Kobzol:symbol-name-sort, r=nnethercotebors-43/+60
Sort mono items by symbol name Trying to claw back cycles/branch/cache miss losses from https://github.com/rust-lang/rust/pull/144722.
2025-08-22Updated uitests for new parserJonathan Brouwer-151/+193
2025-08-22Use the new attribute parser throughout the codebaseJonathan Brouwer-41/+71
2025-08-22chore: remove redundant word in comment (#15530)Philipp Krones-1/+1
remove redundant word in comment changelog: none
2025-08-22Rewrite the new attribute parserJonathan Brouwer-243/+303
2025-08-22chore: remove redundant word in commentxihuwenhua-1/+1
Signed-off-by: xihuwenhua <xihuwenhua@outlook.com>
2025-08-22Move validate_attr to `rustc_attr_parsing`Jonathan Brouwer-85/+99
2025-08-22address review commentsDeadbeef-35/+30
2025-08-22don't print invalid labels with `r#`Deadbeef-16/+22
2025-08-22print raw lifetime idents with `r#`Deadbeef-48/+166
2025-08-22Auto merge of #145410 - cuviper:expand-stack, r=lqdbors-1/+2
rustc_expand: ensure stack in `InvocationCollector::visit_expr` In Fedora, when we built rustc with PGO on ppc64le, we started failing the test `issue-74564-if-expr-stack-overflow.rs`. This could also be reproduced on other arches by setting a smaller `RUST_MIN_STACK`, so it's probably just unlucky that ppc64le PGO created a large stack frame somewhere in this recursion path. Adding an `ensure_sufficient_stack` solves the stack overflow. Historically, that test and its fix were added in rust-lang/rust#74708, which was also an `ensure_sufficient_stack` in this area of code at the time. However, the refactor in rust-lang/rust#92573 basically left that to the general `MutVisitor`, and then rust-lang/rust#142240 removed even that ensure call. It may be luck that our tier-1 tested targets did not regress the original issue across those refactors.
2025-08-21Auto merge of #145728 - jhpratt:rollup-nwbw8de, r=jhprattbors-1442/+1510
Rollup of 16 pull requests Successful merges: - rust-lang/rust#137494 (libstd: init(): dup() subsequent /dev/nulls instead of opening them again) - rust-lang/rust#144541 (c-variadic: multiple ABIs in the same program for arm) - rust-lang/rust#144613 (aarch64-nintendo-switch-freestanding - Enable CPU features that are always available in a live system (crypto instructions, plus explicit NEON).) - rust-lang/rust#144780 (Add a method to dump MIR in the middle of MIR building) - rust-lang/rust#145137 (Consolidate panicking functions in `slice/index.rs`) - rust-lang/rust#145507 (Refactor attribute parsing to improve ergonomics and some diagnostics) - rust-lang/rust#145604 (Gate static closures behind a parser feature) - rust-lang/rust#145648 (Add two tidy dependency checks) - rust-lang/rust#145661 (update some s390x codegen tests) - rust-lang/rust#145672 (Instantiate higher-ranked binder with erased when checking `IntoIterator` predicate for query instability) - rust-lang/rust#145689 (Migrate `panic_unwind` to use `cfg_select!`) - rust-lang/rust#145700 (Handle `ReEarlyParam` in `type_name`.) - rust-lang/rust#145703 (Remove MIPS targets from CI LLVM platforms) - rust-lang/rust#145704 (ci: don't cleanup windows disk) - rust-lang/rust#145705 (remove an `as` cast in prefetch codegen) - rust-lang/rust#145712 (Update outdated link in bound region comments) r? `@ghost` `@rustbot` modify labels: rollup
2025-08-21`renamed_function_params`: clean-up a bit (#15524)Timo-19/+12
changelog: none
2025-08-22`renamed_function_params`: clean-up a bitAda Alakbarova-19/+12
use `iter::zip` use `Option::filter` use `Option::is_some_and` match in two steps
2025-08-21Rollup merge of #145712 - notJoon:fix/outdate-link, r=lqdJacob Pratt-1/+1
Update outdated link in bound region comments While reading the implementation code for bound regions, I found that a link in the comments was outdated. I've updated it with a link to the corresponding documentation in the rustc dev guide that covers the same content. prev link: https://rustc-dev-guide.rust-lang.org/early-late-bound-params/early-late-bound-summary.html (404 error) updated: https://rustc-dev-guide.rust-lang.org/early_late_parameters.html
2025-08-21Rollup merge of #145705 - folkertdev:prefetch-remove-as-cast, r=RalfJungJacob Pratt-1/+1
remove an `as` cast in prefetch codegen r? `@RalfJung`
2025-08-21Rollup merge of #145704 - marcoieni:no-windows-disk-cleanup, r=jieyouxuJacob Pratt-246/+2
ci: don't cleanup windows disk
2025-08-21Rollup merge of #145703 - Gelbpunkt:ci-llvm-mips, r=KobzolJacob Pratt-4/+0
Remove MIPS targets from CI LLVM platforms All of these were demoted to tier 3 a while ago and we aren't building LLVM for them anymore.
2025-08-21Rollup merge of #145700 - nnethercote:fix-145696, r=lcnrJacob Pratt-4/+20
Handle `ReEarlyParam` in `type_name`. Fixes rust-lang/rust#145696. r? `@lcnr`
2025-08-21Rollup merge of #145689 - cuviper:panic_unwind-cfg, r=joshtriplettJacob Pratt-14/+20
Migrate `panic_unwind` to use `cfg_select!` This follows rust-lang/rust#145489 with an additional place we can drop the `cfg-if` dependency.
2025-08-21Rollup merge of #145672 - compiler-errors:query-instab-ice, r=lcnrJacob Pratt-9/+25
Instantiate higher-ranked binder with erased when checking `IntoIterator` predicate for query instability Fixes https://github.com/rust-lang/rust/issues/145652 which was introduced by https://github.com/rust-lang/rust/pull/139345 because we were skipping a binder before calling `Instance::try_resolve`. r? lcnr
2025-08-21Rollup merge of #145661 - folkertdev:s390x-codegen-test-cleanup, r=dianqkJacob Pratt-59/+46
update some s390x codegen tests By using `minicore`, `&raw` and removing use of `link_llvm_intrinsics`
2025-08-21Rollup merge of #145648 - bjorn3:tidy_deps_stricter, r=davidtwcoJacob Pratt-0/+33
Add two tidy dependency checks Deny duplicate dependencies for the standard library as it would almost certainly bloat executables. And deny proc-macro dependencies for the standard library as they would break cross-compilation.
2025-08-21Rollup merge of #145604 - compiler-errors:static-closure, r=fmeaseJacob Pratt-24/+67
Gate static closures behind a parser feature I'd like to gate `static ||` closures behind a feature gate, since we shouldn't allow people to take advantage of this syntax if it's currently unstable. Right now, since it's only rejected after ast lowering, it's accessible to macros. Let's crater this to see if we can claw it back without breaking anyone's code.
2025-08-21Rollup merge of #145507 - jdonszelmann:refactor-attr-parsing, r=davidtwcoJacob Pratt-918/+884
Refactor attribute parsing to improve ergonomics and some diagnostics
2025-08-21Rollup merge of #145137 - Kmeakin:km/optimize-slice-index-panicking, r=jhprattJacob Pratt-137/+269
Consolidate panicking functions in `slice/index.rs` Consolidate all the panicking functions in `slice/index.rs` to use a single `slice_index_fail` function, similar to how it is done in `str/traits.rs`. Split off from https://github.com/rust-lang/rust/pull/145024
2025-08-21Rollup merge of #144780 - bjorn3:mir_build_debug, r=matthewjasperJacob Pratt-0/+37
Add a method to dump MIR in the middle of MIR building This makes it easier to debug issues with MIR building by inserting dump_for_debugging calls around the suspected code responsible for the bad MIR.
2025-08-21Rollup merge of #144613 - pantsman0:nintendo_switch_cpu_features, r=wesleywiserJacob Pratt-1/+1
aarch64-nintendo-switch-freestanding - Enable CPU features that are always available in a live system (crypto instructions, plus explicit NEON). ~~While some NEON and crypto features may not be supported on the Nintendo Switch at boot (e.g. on the a53 cores) and this has not been tested, the features will _always_ be available if running as a sysmodule or homebrew application under Horizon/Atmosphere.~~ EDIT: the a53 cores are fused out, these features are always available. This has been tested with local tools personally, as well as building [emuiibo](https://github.com/XorTroll/emuiibo) as it uses both `sha` and `aes` primitives. This was tested using inline assembly in previous versions, and in current versions by using the `aes`, `ctr`, `hmac`, and `sha2` crates. r? `@jam1garner` This ended up being much delayed from our discussions about updating this. I tested a number of individual features such as the `aes` and `sha2` target-features directly to avoid a warning message with the `crypto` feature, but that appears to be caused by https://github.com/rust-lang/rust/issues/96472 and is not actually an issue. There is also a decision to make here about explicitly enabling the `neon` feature. I am in favor of it to be explicit, but it is not necessary as it is already enabled by the `v8a` and `crypto` features. I will defer to your decision as it does not change the actual instructions available for codegen.
2025-08-21Rollup merge of #144541 - ↵Jacob Pratt-0/+78
folkertdev:c-variadic-same-program-multiple-abis-arm, r=RalfJung,davidtwco c-variadic: multiple ABIs in the same program for arm similar to https://github.com/rust-lang/rust/pull/144379, but for arm, requested in https://github.com/rust-lang/rust/pull/144066. Quoting https://github.com/rust-lang/reference/issues/1946#issuecomment-3124555690 > `"aapcs"` specifically refers to the soft-float ABI where floating-point values are passed in integer registers. However for c-variadic functions, `aapcs` behaves the same as `C`: https://github.com/ARM-software/abi-aa/blob/main/aapcs32/aapcs32.rst#65parameter-passing > A variadic function is always marshaled as for the base standard. https://github.com/ARM-software/abi-aa/blob/main/aapcs32/aapcs32.rst#7the-standard-variants > This section applies only to non-variadic functions. For a variadic function the base standard is always used both for argument passing and result return. --- I also noticed that rustc currently emit more instructions than clang for c-variadic functions on arm, see https://godbolt.org/z/hMce9rnTh. I'll fix that separately. (edit: https://github.com/rust-lang/rust/pull/144549) try-job: armhf-gnu r? `@RalfJung`
2025-08-21Rollup merge of #137494 - nabijaczleweli:dup, r=Mark-SimulacrumJacob Pratt-24/+26
libstd: init(): dup() subsequent /dev/nulls instead of opening them again This will be faster, and also it deduplicates the code so win/win The dup() is actually infallible here. But whatever. Before: ``` poll([{fd=0, events=0}, {fd=1, events=0}, {fd=2, events=0}], 3, 0) = 1 ([{fd=2, revents=POLLNVAL}]) openat(AT_FDCWD, "/dev/null", O_RDWR) = 2 rt_sigaction(SIGPIPE, {sa_handler=SIG_IGN, sa_mask=[PIPE], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7f5749313050}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0 poll([{fd=0, events=0}, {fd=1, events=0}, {fd=2, events=0}], 3, 0) = 2 ([{fd=0, revents=POLLNVAL}, {fd=2, revents=POLLNVAL}]) openat(AT_FDCWD, "/dev/null", O_RDWR) = 0 openat(AT_FDCWD, "/dev/null", O_RDWR) = 2 rt_sigaction(SIGPIPE, {sa_handler=SIG_IGN, sa_mask=[PIPE], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7efe12006050}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0 poll([{fd=0, events=0}, {fd=1, events=0}, {fd=2, events=0}], 3, 0) = 3 ([{fd=0, revents=POLLNVAL}, {fd=1, revents=POLLNVAL}, {fd=2, revents=POLLNVAL}]) openat(AT_FDCWD, "/dev/null", O_RDWR) = 0 openat(AT_FDCWD, "/dev/null", O_RDWR) = 1 openat(AT_FDCWD, "/dev/null", O_RDWR) = 2 rt_sigaction(SIGPIPE, {sa_handler=SIG_IGN, sa_mask=[PIPE], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7fc2dc7ca050}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0 ``` After: ``` poll([{fd=0, events=0}, {fd=1, events=0}, {fd=2, events=0}], 3, 0) = 1 ([{fd=1, revents=POLLNVAL}]) openat(AT_FDCWD, "/dev/null", O_RDWR) = 1 rt_sigaction(SIGPIPE, {sa_handler=SIG_IGN, sa_mask=[PIPE], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7f488a3fb050}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0 poll([{fd=0, events=0}, {fd=1, events=0}, {fd=2, events=0}], 3, 0) = 2 ([{fd=1, revents=POLLNVAL}, {fd=2, revents=POLLNVAL}]) openat(AT_FDCWD, "/dev/null", O_RDWR) = 1 dup(1) = 2 rt_sigaction(SIGPIPE, {sa_handler=SIG_IGN, sa_mask=[PIPE], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7f1a8943c050}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0 poll([{fd=0, events=0}, {fd=1, events=0}, {fd=2, events=0}], 3, 0) = 3 ([{fd=0, revents=POLLNVAL}, {fd=1, revents=POLLNVAL}, {fd=2, revents=POLLNVAL}]) openat(AT_FDCWD, "/dev/null", O_RDWR) = 0 dup(0) = 1 dup(0) = 2 rt_sigaction(SIGPIPE, {sa_handler=SIG_IGN, sa_mask=[PIPE], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7f4e3a4c7050}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0 ```
2025-08-21Add myself back to reviewer rotation (#15523)Samuel Tardieu-1/+0
changelog: none r? ghost