about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-09-17Add space after brace in `Box<[T]>::new_uninit_slice` exampleAlan Wu-1/+1
2025-09-17Do not look for `Cargo.toml` inside `target`Samuel Tardieu-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`.
2025-09-17Remove automatic feature freeze commentSamuel Tardieu-108/+0
The feature freeze period is over.
2025-09-17Fix `unnecessary_unwrap` false negative (#12295) (#15689)Alex Macleod-1/+58
Fix `unnecessary_unwrap` false negative when unwrapping a known value inside a macro call Fixes rust-lang/rust-clippy#12295 Produces no changes to `lintcheck` changelog: [`unnecessary_unwrap`]: Fix false negative when unwrapping a known value inside a macro call I made sue to run `cargo dev fmt`. I also ran the following checks (in order) on a fresh clone of mi fork: 1. `cargo build` 2. `cargo test` 3. `cargo lintcheck` Running `cargo test` after `lintcheck` causes a test to fail, but this also happens on a clean fork without my changes
2025-09-17Fix applicable on variant field for change_visibilityA4-Tacks-0/+14
Enum variant fields do not allow visibility Example --- ```rust enum Foo { Variant($0String), } ``` **Before this PR**: ```rust enum Foo { Variant(pub(crate) String), } ``` **After this PR**: Assist not applicable
2025-09-17Merge pull request #20583 from btj/comments-enableChayim Refael Friedman-18/+156
Add `rust-analyzer.semanticHighlighting.comments.enable`
2025-09-17Check ZST via `PassMode`Marcelo Domínguez-4/+19
2025-09-17Auto merge of #146331 - RalfJung:copy-prov-repeat, r=oli-obkbors-82/+88
interpret: copy_provenance: avoid large intermediate buffer for large repeat counts Copying provenance worked in this odd way where the "preparation" phase (which is supposed to just extract the necessary information from the source range) already did all the work of repeating the result N times for the target range. This was needed to use the existing `insert_presorted` function on `SortedMap`. This PR generalizes `insert_presorted` so that we can avoid this odd structure on copy-provenance, and maybe even improve performance.
2025-09-17Add the `rust-analyzer.semanticHighlighting.comments.enable` configuration valueBart Jacobs-18/+156
2025-09-17fix(transmute_ptr_to_ref): don't suggest `.cast` when to-type is DST (#15621)dswij-26/+150
Fixes https://github.com/rust-lang/rust-clippy/issues/13357 Determining the exact placement of the `if !to_ref_ty.is_sized()`s required meticulously constructing the suggestion/truth table of `is_sized`, `msrv.meets` and `has_erased_regions`. The test cases should hopefully cover all the new combinations. changelog: [`transmute_ptr_to_ref`]: don't suggest `.cast` when to-type is DST
2025-09-17Adds AArch64 GCS supportReuben Cruise-4/+18
- Adds option to rustc config to enable GCS - Passes `guarded-control-stack` flag to llvm if enabled
2025-09-17rustc_codegen_llvm: Reorder conversion casesTsukasa OI-11/+11
For maintainability, this commit reorders target feature conversion cases by the architecture.
2025-09-17rustc_codegen_llvm: Simplify `arch` conversionTsukasa OI-10/+7
This commit simplifies construction of `arch` from `sess.target.arch`. It also preserves a reference to `sess.target.arch` as `raw_arch` to make this function future proof.
2025-09-17rustc_codegen_llvm: Name major version of LLVMTsukasa OI-1/+2
It makes LLVM version comparison clearer.
2025-09-17Use `LLVMDIBuilderCreateTypedef`Zalathar-25/+17
2025-09-17Use `LLVMDIBuilderCreateQualifiedType`Zalathar-16/+13
2025-09-17Use `LLVMDIBuilderCreateStaticMemberType`Zalathar-44/+57
2025-09-17Use `LLVMDIBuilderCreateMemberType`Zalathar-27/+16
2025-09-17Support ZST argsMarcelo Domínguez-1/+27
2025-09-17update enzyme submoduleManuel Drehwald-0/+0
2025-09-17doc and move single branch match to an if letMarcelo Domínguez-6/+6
2025-09-17Adjust autodiff actitivies for ScalarPairMarcelo Domínguez-0/+17
2025-09-17Add test for autodiff abi handlingMarcelo Domínguez-0/+210
2025-09-17Auto merge of #142915 - cjgillot:dest-prop-default, r=saethlinbors-923/+590
Enable DestinationPropagation by default This PR proposes to perform destination propagation on MIR. Most of the pass was fully rewritten by `@JakobDegen` in rust-lang/rust#96451. This pass is quite heavy, as it needs to perform and save the results of a full liveness dataflow analysis. This accounts for ~50% of the pass' runtime. Perf sees a few decent savings in later llvm passes, but also sizeable régressions when there are no savings to balance this pass' runtime.
2025-09-17a valid state is achieved by passing the test suiteTshepang Mbambo-1/+1
2025-09-17Merge pull request #4590 from rust-lang/rustup-2025-09-17Oli Scherer-1805/+2517
Automatic Rustup
2025-09-17Auto merge of #146666 - Zalathar:rollup-m2b8low, r=Zalatharbors-1385/+4238
Rollup of 14 pull requests Successful merges: - rust-lang/rust#142807 (libtest: expose --fail-fast as an unstable command-line option) - rust-lang/rust#144871 (Stabilize `btree_entry_insert` feature) - rust-lang/rust#145071 (Update the minimum external LLVM to 20) - rust-lang/rust#145181 (remove FIXME block from `has_significant_drop`, it never encounters inference variables) - rust-lang/rust#145660 (initial implementation of the darwin_objc unstable feature) - rust-lang/rust#145838 (don't apply temporary lifetime extension rules to non-extended `super let`) - rust-lang/rust#146259 (Suggest removing Box::new instead of unboxing it) - rust-lang/rust#146410 (Iterator repeat: no infinite loop for `last` and `count`) - rust-lang/rust#146460 (Add tidy readme) - rust-lang/rust#146552 (StateTransform: Do not renumber resume local.) - rust-lang/rust#146564 (Remove Rvalue::Len again.) - rust-lang/rust#146581 (Detect attempt to use var-args in closure) - rust-lang/rust#146588 (tests/run-make: Update list of statically linked musl targets) - rust-lang/rust#146631 (cg_llvm: Replace some DIBuilder wrappers with LLVM-C API bindings (part 3)) r? `@ghost` `@rustbot` modify labels: rollup
2025-09-17Fix complete type in nested patternA4-Tacks-0/+20
Example --- ```rust struct Foo { num: u32 } struct Bar(Foo); fn foo(Bar($0)) {} ``` **Before this PR**: ```rust struct Foo { num: u32 } struct Bar(Foo); fn foo(Bar(Foo { num$1 }: Foo$0)) {} ``` **After this PR**: ```rust struct Foo { num: u32 } struct Bar(Foo); fn foo(Bar(Foo { num$1 }$0)) {} ```
2025-09-17Merge ref '3f1552a273e4' from rust-lang/rustThe Miri Cronjob Bot-1804/+2516
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: 3f1552a273e43e15f6ed240d00e1efdd6a53e65e Filtered ref: fbfa7b30a3ad5abd6a5db7e3ef15adc8da1ecc37 Upstream diff: https://github.com/rust-lang/rust/compare/9d82de19dfae60e55c291f5f28e28cfc2c1b9630...3f1552a273e43e15f6ed240d00e1efdd6a53e65e This merge was created using https://github.com/rust-lang/josh-sync.
2025-09-17Rollup merge of #146631 - Zalathar:di-builder, r=nnethercoteStuart Cook-190/+149
cg_llvm: Replace some DIBuilder wrappers with LLVM-C API bindings (part 3) - Part of rust-lang/rust#134001 - Follow-up to rust-lang/rust#136375 - Follow-up to rust-lang/rust#136632 --- This is another batch of LLVMDIBuilder binding migrations, replacing some our own LLVMRust bindings with bindings to upstream LLVM-C APIs. This PR migrates all of the bindings that were touched by rust-lang/rust#136632, plus `LLVMDIBuilderCreateStructType`.
2025-09-17Rollup merge of #146588 - Gelbpunkt:musl-default-linking-test, r=jieyouxuStuart Cook-9/+1
tests/run-make: Update list of statically linked musl targets All of the tier 3 targets in the list now link dynamically by default (except `mips64el-unknown-linux-muslabi64`, I apparently overlooked that one in my PR that changed this). Adjust the list of targets expected to link statically accordingly. See also https://github.com/rust-lang/rust/pull/144410, which changed these targets. Target by target: - `mips64-unknown-linux-musl`: this target does not exist AFAICT - `mips64-unknown-linux-muslabi64`: updated in the linked PR - `powerpc-unknown-linux-musl`: updated in the linked PR - `powerpc-unknown-linux-muslspe`: updated in the linked PR - `powerpc64-unknown-linux-musl`: updated in the linked PR - `riscv32gc-unknown-linux-musl`: updated in the linked PR - `s390x-unknown-linux-musl`: updated in the linked PR - `thumbv7neon-unknown-linux-musleabihf`: updated in the linked PR
2025-09-17Rollup merge of #146581 - estebank:issue-146489, r=lcnrStuart Cook-36/+71
Detect attempt to use var-args in closure ``` error: unexpected `...` --> $DIR/no-closure.rs:11:14 | LL | let f = |...| {}; | ^^^ not a valid pattern | = note: only `extern "C"` and `extern "C-unwind"` functions may have a C variable argument list error: unexpected `...` --> $DIR/no-closure.rs:16:17 | LL | let f = |_: ...| {}; | ^^^ | = note: only `extern "C"` and `extern "C-unwind"` functions may have a C variable argument list ``` Fix rust-lang/rust#146489, when trying to use c-style var-args in a closure. We emit a more targeted message. We also silence inference errors when the pattern is `PatKind::Err`.
2025-09-17Rollup merge of #146564 - cjgillot:mir-nolen, r=scottmcmStuart Cook-292/+1381
Remove Rvalue::Len again. Now that we have `RawPtrKind::FakeForPtrMetadata`, we can reimplement `Rvalue::Len` using `PtrMetadata(&raw const (fake) place)`. r? ``@scottmcm``
2025-09-17Rollup merge of #146552 - cjgillot:resume-noremap, r=jackh726Stuart Cook-225/+639
StateTransform: Do not renumber resume local. MIR parameters are not explicitly assigned-to when entering the MIR body. If we want to save their values inside the coroutine state, we need to do so explicitly. This was done by renaming the `_2` local, and introducing an explicit assignment pre-transform. This particular trick confuses me. This version makes explicit that we are assigning parameters to saved locals. r? ``@dingxiangfei2009``
2025-09-17Rollup merge of #146460 - simp4t7:add-tidy-readme, r=clubby789Stuart Cook-1/+115
Add tidy readme This PR adds a Readme to `src/tools/tidy`. Basically just explains how `tidy` works and covers all of tidy's checks, directives, and how to use tidy. I tried to add a bit more detail on some of the options like `--extra-checks` and the style directives that aren't really documented well elsewhere. Planning to link to this in the dev guide. Closes: rust-lang/rust#129368
2025-09-17Rollup merge of #146410 - hkBst:repeat-1, r=jhprattStuart Cook-3/+4
Iterator repeat: no infinite loop for `last` and `count` This removes two cases of infinite looping from [`Repeat`](https://doc.rust-lang.org/nightly/std/iter/struct.Repeat.html): - [`last`](https://doc.rust-lang.org/nightly/std/iter/trait.Iterator.html#method.last): By viewing the iterator as returning None after [omega](https://en.wikipedia.org/wiki/Ordinal_number) calls to `next`, this method can simply return the repeated element. - [`count`](https://doc.rust-lang.org/nightly/std/iter/trait.Iterator.html#method.count): From its docs: """The method does no guarding against overflows, so counting elements of an iterator with more than [usize::MAX](https://doc.rust-lang.org/nightly/std/primitive.usize.html#associatedconstant.MAX) elements either produces the wrong result or panics. If overflow checks are enabled, a panic is guaranteed.""", so a panic'ing impl is allowed by the docs, and is more honest than an infinite loop.
2025-09-17Rollup merge of #146259 - camsteffen:remove-the-box, r=jackh726Stuart Cook-3/+49
Suggest removing Box::new instead of unboxing it
2025-09-17Rollup merge of #145838 - dianne:non-extending-super-let, r=jackh726,traviscrossStuart Cook-5/+259
don't apply temporary lifetime extension rules to non-extended `super let` Reference PR: rust-lang/reference#1980 This changes the semantics for `super let` (and macros implemented in terms of it, such as `pin!`, `format_args!`, `write!`, and `println!`) as suggested by ````@theemathas```` in https://github.com/rust-lang/rust/issues/145784#issuecomment-3218658335, making `super let` initializers only count as [extending expressions](https://doc.rust-lang.org/nightly/reference/destructors.html#extending-based-on-expressions) when the `super let` itself is within an extending block. Since `super let` initializers aren't temporary drop scopes, their temporaries outside of inner temporary scopes are effectively always extended, even when not in extending positions; this only affects two cases as far as I can tell: - Block tail expressions in Rust 2024. This PR makes `f(pin!({ &temp() }))` drop `temp()` at the end of the block in Rust 2024, whereas previously it would live until after the call to `f` because syntactically the `temp()` was in an extending position as a result of `super let` in `pin!`'s expansion. - `super let` nested within a non-extended `super let` is no longer extended. i.e. a normal `let` is required to treat `super let`s as extending (in which case nested `super let`s will also be extending). Closes rust-lang/rust#145784 This is a breaking change. Both static and dynamic semantics are affected. The most likely breakage is for programs to stop compiling, but it's technically possible for drop order to silently change as well (as in rust-lang/rust#145784). Since this affects stable macros, it probably would need a crater run. Nominating for discussion alongside rust-lang/rust#145784: ````@rustbot```` label +I-lang-nominated +I-libs-api-nominated Tracking issue for `super let`: rust-lang/rust#139076
2025-09-17Rollup merge of #145660 - jbatez:darwin_objc, r=jdonszelmann,madsmtm,tmandryStuart Cook-11/+1381
initial implementation of the darwin_objc unstable feature Tracking issue: https://github.com/rust-lang/rust/issues/145496 This feature makes it possible to reference Objective-C classes and selectors using the same ABI used by native Objective-C on Apple/Darwin platforms. Without it, Rust code interacting with Objective-C must resort to loading classes and selectors using costly string-based lookups at runtime. With it, these references can be loaded efficiently at dynamic load time. r? ```@tmandry``` try-job: `*apple*` try-job: `x86_64-gnu-nopt`
2025-09-17Rollup merge of #145181 - Borgerr:remove-fixme-from-has-sigdrop, r=lcnrStuart Cook-8/+19
remove FIXME block from `has_significant_drop`, it never encounters inference variables The `FIXME` block in `Ty::has_significant_drop` is outdated as related queries can now handle type inference. https://github.com/rust-lang/rust/blob/321a89bec57b8ca723d1af8f784490b950458c6a/compiler/rustc_middle/src/ty/util.rs#L1378-L1389 Closes rust-lang/rust#86868 (other places mentioned in the issue have been resolved, or moved to other issues) r? types
2025-09-17Rollup merge of #145071 - cuviper:min-llvm-20, r=nikicStuart Cook-597/+153
Update the minimum external LLVM to 20 With this change, we'll have stable support for LLVM 20 and 21. For reference, the previous increase to LLVM 19 was rust-lang/rust#139275. cc ```@rust-lang/wg-llvm``` r? nikic
2025-09-17Rollup merge of #144871 - Kivooeo:btree_entry_insert-stabilize, r=jhprattStuart Cook-4/+2
Stabilize `btree_entry_insert` feature This stabilises `btree_map::VacantEntry::insert_entry` and `btree_map::Entry::insert_entry`, following the FCP in [tracking issue](https://github.com/rust-lang/rust/issues/65225). New stable API: ```rust impl<'a, K: Ord, V, A: Allocator + Clone> Entry<'a, K, V, A> { pub fn insert_entry(self, value: V) -> OccupiedEntry<'a, K, V, A>; } impl<'a, K: Ord, V, A: Allocator + Clone> VacantEntry<'a, K, V, A> { pub fn insert_entry(mut self, value: V) -> OccupiedEntry<'a, K, V, A>; } ``` (FCP ended almost a year ago, so if it's needed for process we could rerun it) Closes: https://github.com/rust-lang/rust/issues/65225
2025-09-17Rollup merge of #142807 - sourcefrog:failfast, r=dtolnayStuart Cook-1/+15
libtest: expose --fail-fast as an unstable command-line option This exposes the `fail_fast` option added in rust-lang/rust#105153 on the test harness command line, so that workflows that only want to know if any test fails can find out without waiting for everything to run. For example, cargo-mutants just needs to know if any tests fails. It only works with `-Zunstable-options`. Tracking issue: rust-lang/rust#142859
2025-09-17Prepare for merging from rust-lang/rustThe Miri Cronjob Bot-1/+1
This updates the rust-version file to 3f1552a273e43e15f6ed240d00e1efdd6a53e65e.
2025-09-17Auto merge of #146656 - weihanglo:update-cargo, r=weihanglobors-0/+0
Update cargo submodule 19 commits in 24bb93c388fb8c211a37986539f24a819dc669d3..966f94733bbc94ca51ff9f1e4c49ad250ebbdc50 2025-09-10 23:16:07 +0000 to 2025-09-16 17:24:45 +0000 - fix(frontmatter): Improve error quality (rust-lang/cargo#15972) - fix: wrong variable name in documentation (rust-lang/cargo#15968) - Add "Optimizing Build Performance" section to the Cargo book (rust-lang/cargo#15924) - Remove extra apostrophe in environment-variables.md (rust-lang/cargo#15963) - Clarify warning for using `features` or `default-features` in `patch` (rust-lang/cargo#15953) - fix(frontmatter): Try alternative len code fences (rust-lang/cargo#15952) - feat(cli): Allow completions for third-party subcommand names (rust-lang/cargo#15961) - docs(index): Clarify what we mean by omitting features (rust-lang/cargo#15957) - fix(future): Report all content as a single Report (rust-lang/cargo#15943) - fix(complete): Show local crates/features over other members (rust-lang/cargo#15956) - docs(resolver): Describe the role of the lockfile (rust-lang/cargo#15958) - chore: Skip check-version-bump ci job in forks (rust-lang/cargo#15959) - Eliminate the last three "did you mean" warning phrasings (rust-lang/cargo#15356) - fix(info): Suggest a more universal `cargo tree` command (rust-lang/cargo#15954) - feat(cli): Use ellipses when truncating progress (rust-lang/cargo#15955) - feat(completer): Added completion for `--features` flag (rust-lang/cargo#15309) - fix(publish): Switch the 'ctrl-c on wait' line to a help message (rust-lang/cargo#15942) - docs: move docs building process to contributor guide (rust-lang/cargo#15854) - fix(manifest): Show error source to users (rust-lang/cargo#15939) r? ghost
2025-09-17Merge modules dyn_compatibility and lint into dyn_traitLeón Orell Valerian Liehr-550/+550
2025-09-17Remove `DynKind`León Orell Valerian Liehr-237/+142
2025-09-17Use `LLVMDIBuilderCreateStructType`Zalathar-42/+29
2025-09-17Use `LLVMDIBuilderCreatePointerType`Zalathar-52/+45
2025-09-17Use `LLVMDIBuilderCreateBasicType`Zalathar-18/+12