about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-09-18support calls on opaque types :<lcnr-124/+734
2025-09-18Auto merge of #146671 - ZuseZ4:update-enzyme-submodule, r=davidtwcobors-0/+0
update enzyme submodule I upstreamed a few of our rust-lang/Enzyme patches, so I could drop them in our fork. r? compiler
2025-09-18Do not replace `.unwrap_or(vec![])` by `.unwrap_or_default()`Samuel Tardieu-47/+62
`.unwrap_or(vec![])` is as readable as `.unwrap_or_default()`.
2025-09-18Check that `.unwrap_or(LITERAL)` doesn't trigger `unwrap_or_default`Samuel Tardieu-38/+62
2025-09-18Remove feature-freeze from gh templates (#15698)Samuel Tardieu-7/+1
ping rust-lang/rust-clippy#15690 changelog: none
2025-09-18Remove feature-freeze from gh templateslukaslueg-7/+1
2025-09-18fix location for nested bodies in promotedslcnr-0/+13
2025-09-18Add GenMC estimation mode. Improve error handling and output printing.Patrick-6-170/+386
2025-09-18Auto merge of #142544 - Sa4dUs:prevent-abi-changes, r=ZuseZ4bors-3/+271
Prevent ABI changes affect EnzymeAD This PR handles ABI changes for autodiff input arguments to improve Enzyme compatibility. Fundamentally this adjusts activities when a function argument is lowered as an `ScalarPair`, so there's no mismatch between diff activities and args. Also removes activities corresponding to ZSTs. fixes: https://github.com/rust-lang/rust/issues/144025 r? `@ZuseZ4`
2025-09-18Remove automatic feature freeze comment (#15690)Alejandra González-108/+0
The feature freeze period is over. changelog: none
2025-09-18Set lto="fat" automatically when compiling with RUSTFLAGS="-Zautodiff=Enable".Haidong Zhang-6/+12
2025-09-18Move target machine command-line quoting from C++ to RustZalathar-49/+92
2025-09-18fix `option_if_let_else` when `Err` variant is ignored (#14429)Manish Goregaokar-16/+60
This fixes an issue where clippy suggests passing a function that takes no arguments as the first argument of `Result::map_or_else`. The function needs to take one argument. Example that triggers the issue: [Playground link](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=0b6f9bc7b6ab4dcd26745065544e0b8a) Fixes #10335. changelog: [`option_if_let_else`]: fix incorrect suggestion when the contents of an `Err` variant are ignored
2025-09-18Auto merge of #146698 - Zalathar:rollup-0oxl4gx, r=Zalatharbors-1038/+916
Rollup of 5 pull requests Successful merges: - rust-lang/rust#146566 (Lint more overlapping assignments in MIR.) - rust-lang/rust#146645 (Cleanup `FnDecl::inner_full_print`) - rust-lang/rust#146664 (Clean up `ty::Dynamic`) - rust-lang/rust#146673 (cg_llvm: Replace some DIBuilder wrappers with LLVM-C API bindings (part 4)) - rust-lang/rust#146694 (Remove ImplSubject) r? `@ghost` `@rustbot` modify labels: rollup
2025-09-17test cases for option_if_let_elseDaniel Gulotta-16/+60
2025-09-18Rollup merge of #146694 - camsteffen:impl-subject, r=compiler-errorsStuart Cook-61/+7
Remove ImplSubject It only has one usage in rustdoc.
2025-09-18Rollup merge of #146673 - Zalathar:di-builder, r=nnethercoteStuart Cook-112/+103
cg_llvm: Replace some DIBuilder wrappers with LLVM-C API bindings (part 4) - Part of rust-lang/rust#134001 - Follow-up to rust-lang/rust#146631 --- This is another batch of LLVMDIBuilder binding migrations, replacing some our own LLVMRust bindings with bindings to upstream LLVM-C APIs.
2025-09-18Rollup merge of #146664 - fmease:clean-up-dyn, r=jdonszelmannStuart Cook-786/+691
Clean up `ty::Dynamic` 1. As a follow-up to PR rust-lang/rust#143036, remove `DynKind` entirely. 2. Inside HIR ty lowering, consolidate modules `dyn_compatibility` and `lint` into `dyn_trait` * `dyn_compatibility` wasn't about dyn compatibility itself, it's about lowering trait object types * `lint` contained dyn-Trait-specific diagnostics+lints only
2025-09-18Rollup merge of #146645 - yotamofek:pr/rustdoc/fndecl_inner_full_print, r=fmeaseStuart Cook-51/+62
Cleanup `FnDecl::inner_full_print` `inner_full_print` was pretty hard to follow IMHO. Hopefully this cleans it up a little bit. Also, it was checking whether `self.inputs` is empty twice, and then handling an unreachable match arm: https://github.com/yotamofek/rust/blob/f836ae4e663b6e8938096b8559e094d18361be55/src/librustdoc/html/format.rs#L1368C1-L1368C33 `last_input_index` could only be `None` if the fn has no parameters, in which case the loop body would never run. r? ``@GuillaumeGomez`` if you have the capacity :) BTW, can we rename `FnDecl::inputs` to `parameters` or something? And `output` to `return_ty`?
2025-09-18Rollup merge of #146566 - cjgillot:mir-overlap-lint, r=saethlinStuart Cook-28/+53
Lint more overlapping assignments in MIR. In an effort to make bugs like https://github.com/rust-lang/rust/issues/146383 more easily discovered, this PR extends the "overlapping assignment" MIR lint. I had to whitelist some rvalues, as they are actually allowed to alias, like `a = a + 1`.
2025-09-18Avoid invalidating from MirPatch::apply.Camille Gillot-3/+3
2025-09-18Merge pull request #20664 from ChayimFriedman2/coerce-nsChayim Refael Friedman-3944/+9358
fix: Port a bunch of stuff from rustc and fix a bunch of type mismatches/diagnostics
2025-09-17Remove ImplSubjectCameron Steffen-61/+7
2025-09-17Do not look for `Cargo.toml` inside `target` (#15692)Jason Newcomb-0/+3
This test, which checks that we do not define new profiles directly in Clippy's multiple `Cargo.toml` files, must not look inside `target` as `lintcheck` might place some third-party sources there. Of course those third-party sources are allowed to define profiles in their `Cargo.toml`. changelog: none
2025-09-17std: Fix WASI implementation of `remove_dir_all`Alex Crichton-1/+8
This commit is a change to the WASI-specific implementation of the `std::fs::remove_dir_all` function. Specifically it changes how directory entries are read of a directory-being-deleted to specifically buffer them all into a `Vec` before actually proceeding to delete anything. This is necessary to fix an interaction with how the WASIp1 `fd_readdir` API works to have everything work out in the face of mutations while reading a directory. The basic problem is that `fd_readdir`, the WASIp1 API for reading directories, is not a stateful read of a directory but instead a "seekable" read of a directory. Its `cookie` argument enables seeking anywhere within the directory at any time to read further entries. Native host implementations do not have this ability, however, which means that this seeking property must be achieved by re-reading the directory. The problem with this is that WASIp1 has under-specified semantics around what should happen if a directory is mutated between two calls to `fd_readdir`. In essence there's not really any possible implementation in hosts except to read the entire directory and support seeking through the already-read list. This implementation is not possible in the WASIp1-to-WASIp2 adapter that is primarily used to create components for the `wasm32-wasip2` target where it has constrained memory requirements and can't buffer up arbitrarily sized directories. The WASIp1 API definitions are effectively "dead" now at the standards level meaning that `fd_readdir` won't be changing nor will a replacement be coming. For the `wasm32-wasip2` target this will get fixed once filesystem APIs are updated to use WASIp2 directly instead of WASIp1, making this buffering unnecessary. In essence while this is a hack it's sort of the least invasive thing that works everywhere for now. I don't think this is viable to fix in hosts so guests compiled to wasm are going to have to work around it by not relying on any guarantees about what happens to a directory if it's mutated between reads.
2025-09-17add `[const] PartialEq` bound to `PartialOrd`Nathaniel McCallum-1/+3
This change is included for discussion purposes. The PartialOrd bound on PartialEq is not strictly necessary. It is, rather, logical: anything which is orderable should by definition have equality. Is the same true for constness? Should every type which is const orderable also have const equality?
2025-09-17Remove jujutsu directory from search tools. (#15695)Samuel Tardieu-0/+3
This prevents ripgrep from searching the directory by default. changelog: none
2025-09-17Auto merge of #146685 - jdonszelmann:rollup-kwuih4z, r=jdonszelmannbors-89/+143
Rollup of 7 pull requests Successful merges: - rust-lang/rust#146458 (Add parallel-frontend-threads to bootstrap.toml and enable multi-threaded parallel compilation) - rust-lang/rust#146485 (Remove unsized arg handling in `ArgAbiBuilderMethods::store_fn_arg` implementations) - rust-lang/rust#146536 (clean up several trait related UI tests) - rust-lang/rust#146598 (Make llvm_enzyme a regular cargo feature) - rust-lang/rust#146647 (Move `#[rustc_coherence_is_core]` to the `crate_level` file) - rust-lang/rust#146654 (Do not use `git -C dir`) - rust-lang/rust#146681 (Add space after brace in `Box<[T]>::new_uninit_slice` example) r? `@ghost` `@rustbot` modify labels: rollup
2025-09-17Lint overlapping assignments in MIR.Camille Gillot-28/+53
2025-09-17Remove jujutsu directory from search tools.Jason Newcomb-0/+3
2025-09-17Merge pull request #4589 from LorrensP-2158466/freebsd-readdirRalf Jung-27/+46
support `readdir` on FreeBSD
2025-09-17Merge pull request #2592 from rust-lang/tshepang-patch-5Tshepang Mbambo-4/+4
about-this-guide.md: improve a bit
2025-09-17about-this-guide.md: improve a bitTshepang Mbambo-4/+4
2025-09-17Sort safe intrinsic listltdk-58/+62
2025-09-17readdir for freebsdLorrensP-2158466-27/+46
2025-09-17Rollup merge of #146681 - XrXr:patch-1, r=joboetJana Dönszelmann-1/+1
Add space after brace in `Box<[T]>::new_uninit_slice` example Trivial cosmetic change.
2025-09-17Rollup merge of #146654 - samueltardieu:issue142534, r=KobzolJana Dönszelmann-3/+3
Do not use `git -C dir` Older versions of git (≤ 1.8.5) do not support the `-C dir` global option. Use the `cwd` optional argument when using Python's `subprocess` functionality instead. Fix rust-lang/rust#142534
2025-09-17Rollup merge of #146647 - jdonszelmann:move-coherence-is-core, r=urgauJana Dönszelmann-20/+21
Move `#[rustc_coherence_is_core]` to the `crate_level` file I implemented this one without realizing it already was since it was (in my opinion) in the wrong file and implemented in a batch of all non-crate-level attributes. This commit just cleans it up slightly and moves it. Should be trivial r? `@oli-obk`
2025-09-17Rollup merge of #146598 - bjorn3:feature_llvm_enzyme, r=davidtwcoJana Dönszelmann-15/+23
Make llvm_enzyme a regular cargo feature This makes it clearer that it is set by the build system rather than by the rustc that compiles the current rustc. It also avoids bootstrap needing to pass `--check-cfg llvm_enzyme` to rustc.
2025-09-17Rollup merge of #146536 - omskscream:#133895/clean-ui-tests, r=davidtwcoJana Dönszelmann-34/+60
clean up several trait related UI tests Part of rust-lang/rust#133895 Cleaned up several `issue-xxxx` trait related tests from `/tests/ui/issues`, one commit per issue for review. Will squash them once approved. Related issues: rust-lang/rust#19479 rust-lang/rust#2284 rust-lang/rust#18088 rust-lang/rust#21950
2025-09-17Rollup merge of #146485 - zachs18:store_fn_arg-no-unsized, r=davidtwcoJana Dönszelmann-15/+5
Remove unsized arg handling in `ArgAbiBuilderMethods::store_fn_arg` implementations ... since it is unreachable and would ICE anyway. These branches are unreachable with how `store_fn_arg` is currently used (where it is called, unsized arguments are either: 1. not (yet) supported, or 2. handled differently)[^1], and even if they were reachable, they would ICE anyway, since they call [`OperandValue::store`](https://doc.rust-lang.org/nightly/nightly-rustc/src/rustc_codegen_ssa/mir/operand.rs.html#855-861), which calls [`OperandValue::store_with_flags`](https://doc.rust-lang.org/nightly/nightly-rustc/src/rustc_codegen_ssa/mir/operand.rs.html#887-926) which [panics on any unsized layout](https://doc.rust-lang.org/nightly/nightly-rustc/src/rustc_codegen_ssa/mir/operand.rs.html#900-903). Also updates the `bug!` message in `store_arg` to not suggest `store_fn_arg` for unsized args. [^1]: `store_fn_arg` is only nontrivially[^2] called in `compiler/rustc_codegen_ssa/src/mir/mod.rs` for: Line 428 `extern "rust-call"` tuple (un)splitting, which does not support unsized arguments, Line 496 which is only for sized `PassMode::Indirect` (`meta_attrs: None`) arguments, and Line 521 which is only for non-`PassMode::Indirect` arguments which can never be unsized. [^2]: `<Bx as ArgAbiBuilderMethods>::store_fn_arg` is what is actually called, but codegen_llvm and codegen_gcc's builders both delegate to their own `codegen_crate::ArgAbiExt::store_fn_arg`, which contain the actual implementations that are changed in this PR.
2025-09-17Rollup merge of #146458 - Hayden602:bootstrap, r=KobzolJana Dönszelmann-1/+30
Add parallel-frontend-threads to bootstrap.toml and enable multi-threaded parallel compilation Add the option to use the parallel compiler when building Rust code in bootstrap.
2025-09-17Auto merge of #139849 - thaliaarchi:args/zkvm, r=ibraheemdevbors-45/+58
Fix `env::ArgsOs` for zkVM The zkVM implementation of `env::ArgsOs` incorrectly reports the full length even after having iterated. Instead, use a range approach which works out to be simpler. Also, implement more iterator methods like the other platforms in #139847. cc `@flaub` `@jbruestle` `@SchmErik`
2025-09-17Merge pull request #2591 from rust-lang/tshepang-patch-5nora-1/+1
a valid state is achieved by passing the test suite
2025-09-17`match_as_ref`: do not lint if other arm is not `None => None` (#15693)Alex Macleod-9/+73
Fixes rust-lang/rust-clippy#15691 changelog: [`match_as_ref`]: do not lint if other arm is not `None => None`
2025-09-17suggestion for `rest_pat_in_fully_bound_structs` (#15648)Samuel Tardieu-6/+83
changelog: [`rest_pat_in_fully_bound_structs`]: add suggestion
2025-09-17`match_as_ref`: do not lint if other arm is not `None => None`Samuel Tardieu-9/+73
2025-09-17Cleanup `FnDecl::inner_full_print`Yotam Ofek-51/+62
2025-09-17port `#[rustc_coherence_is_core]` to the new attribute parsing infrastructureJana Dönszelmann-20/+21
2025-09-17Merge pull request #20682 from A4-Tacks/fix-change-vis-applicable-on-variantShoyu Vanilla (Flint)-0/+14
Fix applicable on variant field for change_visibility