about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
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-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-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-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-17Use `LLVMDIBuilderCreateStructType`Zalathar-42/+29
2025-09-17Use `LLVMDIBuilderCreatePointerType`Zalathar-52/+45
2025-09-17Use `LLVMDIBuilderCreateBasicType`Zalathar-18/+12
2025-09-17Use `LLVMDIBuilderCreateArrayType`Zalathar-25/+15
2025-09-17Use `LLVMDIBuilderCreateUnionType`Zalathar-34/+25
2025-09-17Use `LLVMDIBuilderCreateSubroutineType`Zalathar-19/+23
2025-09-16Bless ui.Camille Gillot-25/+21
2025-09-16Do not renumber resume local.Camille Gillot-252/+228
2025-09-16Add test.Camille Gillot-11/+453
2025-09-16Add test.Camille Gillot-1/+724
2025-09-16Update docs.Camille Gillot-1/+2
2025-09-16Remove Rvalue::Len.Camille Gillot-291/+656
2025-09-16Auto merge of #146650 - matthiaskrgr:rollup-rjrklz9, r=matthiaskrgrbors-43/+183
Rollup of 5 pull requests Successful merges: - rust-lang/rust#146442 (Display ?Sized, const, and lifetime parameters in trait item suggestions across a crate boundary) - rust-lang/rust#146474 (Improve `core::ascii` coverage) - rust-lang/rust#146605 (Bump rustfix 0.8.1 -> 0.8.7) - rust-lang/rust#146611 (bootstrap: emit hint if a config key is used in the wrong section) - rust-lang/rust#146618 (Do not run ui test if options specific to LLVM are used when another codegen backend is used) r? `@ghost` `@rustbot` modify labels: rollup
2025-09-16Update cargo submoduleWeihang Lo-0/+0
2025-09-16add Readme.md to tidyT-1/+115
update Readme add info about githooks and bootstrap.toml add info about config and remove linting specific files add link to rustc-dev-guide
2025-09-16Update the FIXME comments in the generic three_way_compareJosh Stone-8/+11
2025-09-16Merge similar output checks in assembly-llvm/x86_64-cmpJosh Stone-16/+7
2025-09-16Update the minimum external LLVM to 20Josh Stone-595/+157
2025-09-16Auto merge of #138271 - mu001999-contrib:fix-138234, r=jackh726bors-0/+73
Keep space if arg does not follow punctuation when lint unused parens Fixes rust-lang/rust#138234 If the arg follows punctuation, still pass `left_pos` with `None` and no space will be added, else then pass `left_pos` with `Some(arg.span.lo())`, so that we can add the space as expected. And `emit_unused_delims` can make sure no more space will be added if the expr follows space. --- Edited: Directly use the `value_span` to check whether the expr removed parens will follow identifier or be followed by identifier.
2025-09-16Rollup merge of #146618 - GuillaumeGomez:backend-run-llvm-options, r=kobzolMatthias Krüger-5/+12
Do not run ui test if options specific to LLVM are used when another codegen backend is used Based on errors in https://github.com/rust-lang/rust/pull/146414, some tests with LLVM-specific options are run when another codegen is actually the one used. This PR ignores these tests in such cases now to prevent this situation. r? `@kobzol`
2025-09-16Rollup merge of #146611 - ↵Matthias Krüger-11/+98
lolbinarycat:bootstrap-toml-wrong-section-diagnostic, r=Kobzol bootstrap: emit hint if a config key is used in the wrong section based on discussion on rust-lang/rust#146591 now, if the user puts `build.download-rustc` in `bootstrap.toml`, they'll get a diagnostic: ``hint: try moving `download-rustc` to the `rust` section`` and if they nest things too much (`rust.rust.download-rustc`): ``hint: section name `rust` used as a key within a section`` if they specify a top-level key within a section (`rust.profile`): ``hint: try using `profile` as a top level key`` r? `@Kobzol`
2025-09-16Rollup merge of #146605 - jyn514:update-rustfix, r=nnethercoteMatthias Krüger-10/+10
Bump rustfix 0.8.1 -> 0.8.7 This commit can be replicated by running `cargo update -p rustfix --precise 0.8.7 && x test ui --bless`. --- The reasons this affects UI tests is as follows: - The UI test suite runs rustc with `-Z deduplicate-diagnostics=no --error-format=json`, which means that rustc emits multiple errors containing identical suggestions. That caused the weird-looking code that had multiple `X: Copy` suggestions. - Those suggestions are interpreted not by rustc itself, but by the `rustfix` library, maintained by cargo but published as a separate crates.io library and used by compiletest. - Sometime between rustfix 0.8.1 and 0.8.7 (probably in rust-lang/cargo#14747, but it's hard to tell because rustfix's versioning doesn't match cargo's), rustfix got smarter and stopped applying duplicate suggestions. Update rustfix to match cargo's behavior. Ideally, we would always share a version of rustfix between cargo and rustc (perhaps with a path dependency?), to make sure we are testing the behavior we ship. But for now, just manually update it to match. Note that the latest version of rustfix published to crates.io is 0.9.1, not 0.8.7. But 0.9.1 is not the version used in cargo, which is 0.9.3. Rather than trying to match versions exactly, I just updated rustfix to the latest in the 0.8 branch.
2025-09-16Rollup merge of #146474 - ferrocene:pvdrz/improve-ascii-coverage, r=NoratriebMatthias Krüger-0/+7
Improve `core::ascii` coverage This PR improves the `core::ascii` coverage by adding a new test to `coretests` r? `@workingjubilee`
2025-09-16Rollup merge of #146442 - Qelxiros:trait-suggestion-generics, r=BoxyUwUMatthias Krüger-17/+56
Display ?Sized, const, and lifetime parameters in trait item suggestions across a crate boundary context: rust-lang/rust#145929 This fixes the MetaSized issue and adds const generics and early bound lifetimes. Late bound lifetimes are harder because they aren't returned by `generics_of`. I'm going to look into it, but there's no guarantee I'll be successful. Fixes https://github.com/rust-lang/rust/issues/146404. r? `@BoxyUwu`
2025-09-16Detect top-level `...` in argument typeEsteban Küber-9/+36
When writing something like the expression `|_: ...| {}`, we now detect the `...` during parsing explicitly instead of relying on the detection in `parse_ty_common` so that we don't talk about "nested `...` are not supported". ``` error: unexpected `...` --> $DIR/no-closure.rs:6:35 | LL | const F: extern "C" fn(...) = |_: ...| {}; | ^^^ | = note: only `extern "C"` and `extern "C-unwind"` functions may have a C variable argument list ```
2025-09-16Reword noteEsteban Küber-2/+2
2025-09-16remove redundant testEsteban Küber-20/+0
2025-09-16fmtEsteban Küber-2/+3
2025-09-16bootstrap: emit hint if a config key is used in the wrong sectionbinarycat-11/+98
2025-09-16Do not run ui test if options specific to llvm are used when another codegen ↵Guillaume Gomez-5/+12
backend is used