about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-07-29cleanup: Trim trailing whitespaceTrevor Gross-4/+4
2025-07-29Verify llvm-needs-components are not empty and match the --target valueDaniel Paoliello-97/+277
2025-07-29Auto merge of #144557 - cjgillot:lower-more-span, r=compiler-errorsbors-16/+45
Complete span AST lowering. r? `@ghost`
2025-07-29Do not autofix comments containing bare CR (#15175)Alejandra González-0/+35
When a bare CR is present in a four slashes comment, keep triggering the lint but do not issue a fix suggestion as bare CRs are not supported in doc comments. An extra note is added to the diagnostic to warn the user about it. I have put the test in a separate file to make it clear that the bare CR is not a formatting error. Fixes rust-lang/rust-clippy#15174 changelog: [`four_forward_slashes`]: warn about bare CR in comment, and do not propose invalid autofix
2025-07-29tests: Test line number in debuginfo for diverging function callsMartin Nordholts-0/+38
2025-07-29Fix `search_is_some` suggests wrongly inside macro (#15135)Alejandra González-5/+73
Closes rust-lang/rust-clippy#15102 changelog: [`search_is_some`] fix wrong suggestions inside macro
2025-07-29Update wasi-sdk to 27.0 in CIAlex Crichton-4/+4
This updates the wasi-sdk used in CI to build release binaries and run CI with. No major motivation beyond keeping things up-to-date and following the development of wasi-sdk.
2025-07-29Remove no longer needed handling of nonstandard licensesJakub Beránek-19/+0
2025-07-29Update license exceptions for rustc-perfJakub Beránek-1/+1
2025-07-29Improve tidy error on dependency license exceptionsJakub Beránek-7/+23
2025-07-29replace `make::` to `SyntaxFactory::` in `inline_type_alias`Hmikihiro-11/+16
2025-07-29Update rustc-perf submoduleJakub Beránek-0/+0
2025-07-29Reuse `sign_extend` helperOli Scherer-3/+3
2025-07-29Pick the largest niche even if the largest niche is wrapped aroundOli Scherer-35/+91
2025-07-29Auto merge of #144637 - Zalathar:rollup-t1yo1jy, r=Zalatharbors-226/+1100
Rollup of 6 pull requests Successful merges: - rust-lang/rust#144560 (coverage: Treat `#[automatically_derived]` as `#[coverage(off)]`) - rust-lang/rust#144566 (Simplify `align_of_val::<[T]>(…)` → `align_of::<T>()`) - rust-lang/rust#144587 (expand: Micro-optimize prelude injection) - rust-lang/rust#144589 (Account for `.yield` in illegal postfix operator message) - rust-lang/rust#144615 (Make resolve_fn_signature responsible for its own rib.) - rust-lang/rust#144634 (Fix typo in `DropGuard` doc) r? `@ghost` `@rustbot` modify labels: rollup
2025-07-29Rollup merge of #144634 - lucaswerkmeister:patch-1, r=lqdStuart Cook-1/+1
Fix typo in `DropGuard` doc Follows-up rust-lang/rust#144236 (I happened to see the typo yesterday but didn’t think it should delay the PR’s merge so I kept quiet, sorryyyyy).
2025-07-29Rollup merge of #144615 - cjgillot:fn-sig-rib, r=petrochenkovStuart Cook-75/+54
Make resolve_fn_signature responsible for its own rib. Small simplification in late resolver rib bookkeeping. r? `@petrochenkov`
2025-07-29Rollup merge of #144589 - compiler-errors:postfix-yield-after-cast, ↵Stuart Cook-1/+28
r=petrochenkov Account for `.yield` in illegal postfix operator message Fixes rust-lang/rust#144527
2025-07-29Rollup merge of #144587 - petrochenkov:optstdprel, r=nnethercoteStuart Cook-107/+105
expand: Micro-optimize prelude injection Use `splice` to avoid shifting the other items twice. Put `extern crate std;` first so it's already resolved when we resolve `::std::prelude::rust_20XX`.
2025-07-29Rollup merge of #144566 - scottmcm:align-of-slice, r=oli-obkStuart Cook-0/+516
Simplify `align_of_val::<[T]>(…)` → `align_of::<T>()` I spotted this while working on the inliner (rust-lang/rust#144561). In particular, if [`Layout::for_value`](https://doc.rust-lang.org/std/alloc/struct.Layout.html#method.for_value) inlines, then it can be pretty easy to end up with an `align_of_val::<[T]>` today (demo: <https://rust.godbolt.org/z/Tesnscj4a>) where we can save at least a block, if not more, by using the version that's an rvalue and not a call.
2025-07-29Rollup merge of #144560 - Zalathar:auto-derived, r=compiler-errorsStuart Cook-42/+396
coverage: Treat `#[automatically_derived]` as `#[coverage(off)]` One of the contributing factors behind https://github.com/rust-lang/rust/issues/141577#issuecomment-3120667286 was the presence of derive-macro-generated code containing nested closures. Coverage instrumentation already has a heuristic for skipping code marked with `#[automatically_derived]` (rust-lang/rust#120185), because derived code is usually not worth instrumenting, and also has a tendency to trigger vexing edge-case bugs in coverage instrumentation or coverage codegen. However, the existing heuristic only applied to the associated items directly within an auto-derived impl block, and had no effect on closures or nested items within those associated items. This PR therefore extends the search for `#[coverage(..)]` attributes to also treat `#[automatically_derived]` as an implied `#[coverage(off)]` for the purposes of coverage instrumentation. --- This change doesn’t rule out an entire category of bugs, because it only affects code that actually uses the auto-derived attribute. But it should reduce the overall chance of edge-case macro span bugs being observed in the wild.
2025-07-29"Cachify" `ExternPreludeEntry.binding` through a `Cell`.LorrensP-2158466-12/+11
2025-07-29LoongArch64 LSX fast-path for `str.contains(&str)`WANG Rui-3/+16
Benchmark results with LLVM 21 on LA664: ``` OLD: test bench_is_contained_in ... bench: 43.63 ns/iter (+/- 0.04) NEW: test bench_is_contained_in ... bench: 12.81 ns/iter (+/- 0.01) ```
2025-07-29add `SyntaxFactory::record_expr` to hide clone_for_updateHmikihiro-8/+30
2025-07-29Relax check lines in x86-return-float.rsNikita Popov-3/+3
On LLVM 21 additional %esp adjustments are generated. Don't use NEXT to allow these.
2025-07-29Merge pull request #20337 from ChayimFriedman2/double-inlay-hintsLukas Wirth-13/+43
fix: When displaying a projection into a type parameter that has bounds as `impl Trait`, collect only the bounds of this projection
2025-07-29When displaying a projection into a type parameter that has bounds as `impl ↵Chayim Refael Friedman-13/+43
Trait`, collect only the bounds of this projection It used to collect the bounds of them all.
2025-07-29Fix typo in `DropGuard` docLucas Werkmeister-1/+1
2025-07-29Merge pull request #4505 from Kobzol/ci-gh-appRalf Jung-5/+8
Use GH app for authenticating pull PRs
2025-07-29Add support for the m68k architecture in 'object_architecture'FractalFir-0/+1
2025-07-29Merge pull request #20154 from joshka/jm/improve-setting-titlesLukas Wirth-624/+899
Improve settings tree title and descriptions
2025-07-29Apply suggestions from code reviewJakub Beránek-1/+2
Co-authored-by: Ralf Jung <post@ralfj.de>
2025-07-29Auto merge of #144633 - Zalathar:rollup-h984m13, r=Zalatharbors-2327/+4977
Rollup of 13 pull requests Successful merges: - rust-lang/rust#144022 (Implementation: `#[feature(sync_nonpoison)]`, `#[feature(nonpoison_mutex)]`) - rust-lang/rust#144167 (Document why `Range*<&T> as RangeBounds<T>` impls are not `T: ?Sized`, and give an alternative.) - rust-lang/rust#144407 (fix(debuginfo): disable overflow check for recursive non-enum types) - rust-lang/rust#144451 (fix: Reject upvar scrutinees for `loop_match`) - rust-lang/rust#144482 (Add explicit download methods to download module in bootstrap) - rust-lang/rust#144500 (thread name in stack overflow message) - rust-lang/rust#144511 (tidy: increase performance of auto extra checks feature) - rust-lang/rust#144599 (bootstrap: enable tidy auto extra checks on tools profile) - rust-lang/rust#144600 (Ensure external paths passed via flags end up in rustdoc depinfo) - rust-lang/rust#144609 (feat: Right align line numbers) - rust-lang/rust#144623 (miri subtree update) - rust-lang/rust#144626 (cc dependencies: clarify comment) - rust-lang/rust#144627 (Add a test case for the issue rust-lang/rust#129882) r? `@ghost` `@rustbot` modify labels: rollup
2025-07-29Rollup merge of #144627 - jakubadamw:issue-129882, r=lqdStuart Cook-0/+42
Add a test case for the issue #129882 It ensures that using the `generic_const_exprs` feature in a library crate without enabling it in a dependent crate does not lead to an ICE. Closes https://github.com/rust-lang/rust/issues/129882.
2025-07-29Rollup merge of #144626 - RalfJung:cc-pin-comment, r=lqdStuart Cook-4/+4
cc dependencies: clarify comment This caused confusion in https://github.com/rust-lang/rust/pull/144570 r? ``@jieyouxu``
2025-07-29Rollup merge of #144623 - RalfJung:miri, r=RalfJungStuart Cook-1468/+2745
miri subtree update Subtree update of `miri` to https://github.com/rust-lang/miri/commit/fc4d9a2720d38f815d3e20627b805b4a379e5c8b. Created using https://github.com/rust-lang/josh-sync. r? `@ghost`
2025-07-29Rollup merge of #144609 - Muscraft:right-align, r=compiler-errorsStuart Cook-54/+64
feat: Right align line numbers As part of my work on getting `annotate-snipptes` to be used as `rustc`'s renderer, I realized that `rustc` left-aligned line numbers, while `annotate-snippets` right-aligned them. This PR switches `rustc` to right-align the line numbers, matching `annotate-snippets`. In practice, this change isn't very noticeable in day-to-day output, as it only shows up when a diagnostic span contains line numbers with different lengths (9->10, 99->100, 999->1000, etc.). `rustc` ``` error[E0412]: cannot find type `F` in this scope --> $DIR/ui-testing-optout.rs:92:10 | 4 | type A = B; | ----------- similarly named type alias `A` defined here ... 92 | type E = F; | ^ help: a type alias with a similar name exists: `A` ``` `annotate-snippets` ``` error[E0412]: cannot find type `F` in this scope --> $DIR/ui-testing-optout.rs:92:10 | 4 | type A = B; | ----------- similarly named type alias `A` defined here ... 92 | type E = F; | ^ help: a type alias with a similar name exists: `A` ``` r? ``@compiler-errors``
2025-07-29Rollup merge of #144600 - Noratrieb:rustdoc-dep-info-paths, r=GuillaumeGomezStuart Cook-17/+53
Ensure external paths passed via flags end up in rustdoc depinfo rustdoc has many flags to pass external HTML/Markdown/CSS files that end up in the build. These need to be recorded in depinfo so that Cargo will rebuild the crate if they change.
2025-07-29Rollup merge of #144599 - ↵Stuart Cook-0/+5
lolbinarycat:bootstrap-build.tidy-extra-checks-enable-for-tools, r=Kobzol bootstrap: enable tidy auto extra checks on tools profile alternative to https://github.com/rust-lang/rust/pull/144461 this won't affect CI or any `./configure` based workflows, and will also not affect every rust contributor like that PR will. a slower rollout of this feature should reduce disruption if issues are discovered with it. r? ``@Kobzol``
2025-07-29Rollup merge of #144511 - lolbinarycat:tidy-extra-checks-opt, r=KobzolStuart Cook-30/+55
tidy: increase performance of auto extra checks feature Removes the repeated calls to git diff. Halves the overhead of the tidy extra checks feature from 0.1 seconds to 0.05 on my machine, but probably will be more significant on systems on slow disks or less memory for i/o cache. r? ``@Kobzol``
2025-07-29Rollup merge of #144500 - joboet:thread-name-stack-overflow, r=ChrisDentonStuart Cook-32/+87
thread name in stack overflow message Fixes rust-lang/rust#144481, which is caused by the thread name not being initialised yet when setting up the stack overflow information. Unfortunately, the stack overflow UI test did not test for the correct thread name being present, and testing this separately didn't occur to me when writing https://github.com/rust-lang/rust/pull/140628. This PR contains the smallest possible fix I could think of: passing the thread name explicitly to the platform thread creation function. In the future I'd very much like to explore some possibilities around merging the thread packet and thread handle into one structure and using that in the platform code instead – but that's best left for another PR. This PR also amends the stack overflow test to check for thread names, so we don't run into this again. ``@rustbot`` label +beta-nominated
2025-07-29Rollup merge of #144482 - ↵Stuart Cook-479/+657
Shourya742:2025-07-24-have-explicit-download-methods, r=Kobzol Add explicit download methods to download module in bootstrap This PR attempts to decouple the default initialization of the config object from parse_inner. It moves specific download methods, previously used during the initial config setup, into standalone functions outside the config implementation. r? ``@Kobzol``
2025-07-29Rollup merge of #144451 - ShoyuVanilla:loop-match-upvar, r=oli-obkStuart Cook-7/+113
fix: Reject upvar scrutinees for `loop_match` Fixes https://github.com/rust-lang/rust/issues/144051 I think we should reject upvars as they are not locals but somewhat like field access
2025-07-29Rollup merge of #144407 - godzie44:godzie44/fix_dwarf_inconsistency, ↵Stuart Cook-2/+34
r=wesleywiser fix(debuginfo): disable overflow check for recursive non-enum types Commit b10edb4 introduce an overflow check when generating debuginfo for expanding recursive types. While this check works correctly for enums, it can incorrectly prune valid debug information for structures. For example see rust-lang/rust#143241 (https://github.com/rust-lang/rust/issues/143241#issuecomment-3073721477). Furthermore, for structures such check does not make sense, since structures with recursively expanding types simply will not compile (there is a `hir_analysis_recursive_generic_parameter` for that). closes rust-lang/rust#143241
2025-07-29Rollup merge of #144167 - zachs18:rangebounds-not-unsized-reason, r=tgross35Stuart Cook-0/+48
Document why `Range*<&T> as RangeBounds<T>` impls are not `T: ?Sized`, and give an alternative. `Range*<&T> as RangeBounds<T>` impls have been tried to be relaxed to `T: ?Sized` at least twice: * https://github.com/rust-lang/rust/pull/61584 * https://github.com/rust-lang/rust/pull/64327 I also was just about to make another PR to do it again until I `./x.py test library/alloc` and rediscovered the type inference regression, then searched around and found the previous PRs. Hence this PR instead so hopefully that doesn't keep happening :stuck_out_tongue:. These impls cannot be relaxed for two reasons: 1. Type inference regressions: See ``@SimonSapin's`` explanation from a previous PR: https://github.com/rust-lang/rust/pull/61584#issuecomment-499601046 2. It's a breaking change: `impl RangeBounds<MyUnsizedType> for std::ops::Range<&MyUnsizedType>` is allowed after the coherence rebalance ([playground link](https://play.rust-lang.org/?version=stable&mode=debug&edition=2024&gist=f704a6fe53bfc33e55b2fc246d895ec2)), and relaxing these impls would conflict with that downstream impl. This PR adds doc-comments explaining that not having `T: ?Sized` is intentional[^1], and gives an explicit alternative: `(Bound<&T>, Bound<&T>)`. Technically, the impls for the unstable new `std::range` types could be relaxed, as they are still unstable so the change would not be breaking, but having them be different in this regard seems worse (and the non-iterable `RangeTo/RangeToInclusive` range types are shared between the "new" and "old" so cannot be changed anyway), and then the type inference regression would pop up in whatever edition the new range types stabilize in. The "see \<link\> for discussion of those issues" is intentionally left as a non-doc comment just for whoever may try to relax these impls again in the future, but if it is preferred to have the link in the docs I can add that. Closes https://github.com/rust-lang/rust/issues/107196 (as wontfix) CC https://github.com/rust-lang/rust/issues/64027 [^1]: "intentional" is maybe a bit of strong wording, should it instead say something like "was stabilized without it and it would be breaking to change it now"?
2025-07-29Rollup merge of #144022 - connortsui20:sync_nonpoison, r=tgross35Stuart Cook-234/+1070
Implementation: `#[feature(sync_nonpoison)]`, `#[feature(nonpoison_mutex)]` Continuation of https://github.com/rust-lang/rust/pull/134663 Tracking Issue: https://github.com/rust-lang/rust/issues/134645 This PR implements a new `sync/nonpoison` module, as well as the `nonpoison` variant of the `Mutex` lock. There are 2 main changes here, the first is the new `nonpoison::mutex` module, and the second is the `mutex` integration tests. For the `nonpoison::mutex` module, I did my best to align it with the current state of the `poison::mutex` module. This means that several unstable features (`mapped_lock_guards`, `lock_value_accessors`, and `mutex_data_ptr`) are also in the new `nonpoison::mutex` module, under their respective feature gates. Everything else in that file is under the correct feature gate (`#[unstable(feature = "nonpoison_mutex", issue = "134645")]`). Everything in the `nonpoison::mutex` file is essentially identical in spirit, as we are simply removing the error case from the original `poison::mutex`. The second big change is in the integration tests. I created a macro called that allows us to duplicate tests that are "generic" over the different mutex types, in that the poison mutex is always `unwrap`ped. ~~I think that there is an argument against doing this, as it can make the tests a bit harder to understand (and language server capabilities are weaker within macros), but I think the benefit of code deduplication here is worth it. Note that it is definitely possible to generalize this (with a few tweaks) to testing the other `nonpoison` locks when they eventually get implemented, but I'll leave that for a later discussion.~~
2025-07-29Adjust enum-discriminant-eq.rs for LLVM 21Nikita Popov-4/+10
The two xors get folded into the select.
2025-07-29Fix nvptx-safe-naming.rs test on LLVM 21Nikita Popov-1/+5
This is now printed on the same line. Use NEXT/SAME depending on the LLVM version.
2025-07-29Merge pull request #20336 from ChayimFriedman2/mut-trait-impl-snippetLukas Wirth-2/+49
fix: In generate_mut_trait_impl, don't add a tabstop if the client does not support snippets
2025-07-29coverage: Treat `#[automatically_derived]` as `#[coverage(off)]`Zalathar-45/+34