about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-08-23`get_diagnostic_item` in a bunch more places (#15519)Samuel Tardieu-169/+145
For https://github.com/rust-lang/rust-clippy/issues/7784 The first commit is for all the places with rather trivial changes: - replacing nested `is_diagnostic_item` `if`s with a match on `get_diagnostic_item` - storing the result of `get_diagnostic_item` in a variable and reusing it The rest of commits are for more involved changes, and for places where changing to `get_diagnostic_item` allowed further simplifications -- in the latter case, the follow-up commits are marked as `misc: ` This is roughly one evening's worth of changes, so I hope the amount won't be overwhelming^^ changelog: none
2025-08-23bootstrap.py: follow up tidy output from CI.Havard Eidnes-2/+3
I thought tidy would be more allergic to 80-coloumn overflow, but so be it.
2025-08-23Merge pull request #4540 from RalfJung/tb-refactorsRalf Jung-144/+116
tree borrows: refactor new-permission logic
2025-08-23std/src/lib.rs: mention "search button" instead of "search bar"Ada Alakbarova-1/+1
2025-08-23refactor tb_rebor: reduce code duplicationRalf Jung-38/+22
2025-08-23tree borrows: refactor new-permission logicRalf Jung-110/+98
2025-08-23Simplify SCC annotations somewhatAmanda Stjerna-24/+8
2025-08-23Rollup merge of #145791 - samueltardieu:fix-zst-to-enum-mir-validation, ↵Samuel Tardieu-0/+41
r=compiler-errors Fix ICE when validating transmuting ZST to inhabited enum MIR validation attempts to determine the number of bytes needed to represent the size of the source type to compute the discriminant for the inhabited target enum. For a ZST source, there is no source data to use as a discriminant so no proper runtime check can be generated. Since that should never be possible, insert a delayed bug to ensure the problem has been properly reported to the user by the type checker. Fixes rust-lang/rust#145786
2025-08-23Rollup merge of #145787 - samueltardieu:push-vovspkkxsxtn, r=KobzolSamuel Tardieu-3/+3
citool: cleanup `mismatched_lifetime_syntaxes` warnings Those lifetimes are implicit earlier in the same signature, and should not be hidden in the output type.
2025-08-23Rollup merge of #145782 - ↵Samuel Tardieu-80/+139
karolzwolak:rustdoc-consistent-attributes-rendering, r=GuillaumeGomez rustdoc: make attributes render consistently While working on rust-lang/rust#132304, I discovered that even standard attributes aren't consistently rendered. For some constructs/fields, attributes were missing entirely, and the attributes were only sometimes wrapped in a code-attribute divs so they appear greyed out. In short this PR: * makes attributes render inside code elements and inside divs with class `code-attribute` * renders attributes for macros, associated constants, and struct/union fields Attributes in `Fields` and `Variants` sections are still not rendered (see struct and enum screenshots), because I wasn't sure we want that. [Compirison of tests/rustdoc/attributes.rs](https://github.com/karolzwolak/rust/blob/90aa25a1c5dbae1e94099b1a2015dfb83783dbe0/tests/rustdoc/attributes.rs) Before (left) / after (right): <img width="279" height="97" alt="image" src="https://github.com/user-attachments/assets/baca4b75-f809-4a76-8ac1-e3aa6389aad4" /> <img width="363" height="112" alt="image" src="https://github.com/user-attachments/assets/14970fb0-6fe5-474f-983e-5a95e16175c5" /> <img width="368" height="492" alt="image" src="https://github.com/user-attachments/assets/f9a25583-10e3-49c7-961b-34f3587b552e" /> <img width="415" height="515" alt="image" src="https://github.com/user-attachments/assets/f2fe4aa0-c731-4f2f-a3c2-04e524a858d1" /> <img width="383" height="483" alt="image" src="https://github.com/user-attachments/assets/bccc1b6e-f236-4948-8557-f9b25cad8a07" /> <img width="402" height="528" alt="image" src="https://github.com/user-attachments/assets/2cea9250-37e1-439e-8010-0603905d0f52" /> <img width="372" height="485" alt="image" src="https://github.com/user-attachments/assets/cd49bc0a-90e1-4d08-af0f-084c42af1834" /> <img width="406" height="542" alt="image" src="https://github.com/user-attachments/assets/67fb4ac7-746b-4e20-9c80-97702a71def8" /> <img width="357" height="131" alt="image" src="https://github.com/user-attachments/assets/42769532-1e4d-486d-bdca-6ecc409554b9" /> <img width="366" height="161" alt="image" src="https://github.com/user-attachments/assets/0b4d01d4-dd8e-4467-8cfc-ad58200ba0d7" /> <img width="291" height="65" alt="image" src="https://github.com/user-attachments/assets/43f61335-8eff-491b-a297-1953d17bbfc0" /> <img width="259" height="57" alt="image" src="https://github.com/user-attachments/assets/598618a3-e52f-4a4e-b790-2c8d5f1b4c77" /> r? ``@GuillaumeGomez``
2025-08-23Rollup merge of #145781 - Kobzol:clippy-remove-profile, r=lqdSamuel Tardieu-7/+0
Remove profile section from Clippy To avoid workspace warnings. [This](https://github.com/rust-lang/rust/pull/145749) subtree sync started causing warnings in Rust builds (https://github.com/rust-lang/rust/issues/145777) because of the `profile` section in Clippy's `Cargo.toml` file. This profile section was added in https://github.com/rust-lang/rust-clippy/pull/13408 last year, and since it also caused issues then, it was later reverted. However, this change recently reappeared in [this commit](https://github.com/rust-lang/rust-clippy/commit/90364dd178b074db391649eed504564ac26f77c1), so it is again causing issues for rust-lang/rust. This PR removes the profile section again. Fixes: https://github.com/rust-lang/rust/issues/145777
2025-08-23Rollup merge of #145774 - Shourya742:2025-08-23-remove-default-opts-method, ↵Samuel Tardieu-53/+0
r=Kobzol Remove default opts from config We forgot to remove this method in https://github.com/rust-lang/rust/pull/145352. This PR removes that. r? ```@Kobzol```
2025-08-23Rollup merge of #145744 - RalfJung:miri-inplace-aliasing, r=compiler-errorsSamuel Tardieu-7/+111
miri: also detect aliasing of in-place argument and return place This is a follow-up to https://github.com/rust-lang/rust/pull/145585 where I forgot to deal with the case of the return place aliasing an in-place argument -- as ``@Amanieu`` mentioned in https://github.com/rust-lang/rust/issues/71117#issuecomment-3212885817, that case must also be forbidden. r? ``@compiler-errors``
2025-08-23Rollup merge of #145729 - nnethercote:dup-packages, r=calebcartwrightSamuel Tardieu-30/+9
Remove two duplicated crates These commits remove `toml-0.5.11` and `dirs-sys-0.4.1`. There are later versions of those same crates already in the tree. Found with `cargo tree -d`. r? ``@jieyouxu``
2025-08-23Rollup merge of #145713 - lcnr:const-trait-bootstrap, r=compiler-errorsSamuel Tardieu-9/+69
next-solver: fix `feature(const_trait_impl)` bootstrap rarw r? ``@compiler-errors`` ``@fee1-dead``
2025-08-23Rollup merge of #145670 - jdonszelmann:port-sanitize, r=lcnrSamuel Tardieu-191/+281
port `sanitize` attribute to the new parsing infrastructure
2025-08-23Rollup merge of #145540 - nia-e:prov-map-range, r=RalfJungSamuel Tardieu-8/+14
interpret/allocation: get_range on ProvenanceMap Helper method to grab all provenances in a given address range for an allocation, making some logic in Miri nicer.
2025-08-23Rollup merge of #145515 - Kmeakin:km/optimize-char-encode-utf8, ↵Samuel Tardieu-21/+26
r=Mark-Simulacrum Optimize `char::encode_utf8` Save a few instructions in `encode_utf8_raw_unchecked` by performing manual CSE.
2025-08-23Rollup merge of #145234 - dianne:1-tuple-witnesses, r=jackh726Samuel Tardieu-25/+13
match exhaustiveness diagnostics: show a trailing comma on singleton tuple consructors in witness patterns (and clean up a little) Constructor patterns of type `(T,)` are written `(pat,)`, not `(pat)`. However, exhaustiveness/usefulness diagnostics would print them as `(pat)` when e.g. providing a witness of non-exhaustiveness and suggesting adding arms to make matches exhaustive; this would result in an error when applied. rust-analyzer already prints the trailing comma, so it doesn't need changing. This also includes some cleanup in the second commit, with justification in the commit message.
2025-08-23Rollup merge of #144452 - morinmorin:apple/update_read_limit, r=ChrisDentonSamuel Tardieu-3/+3
std/sys/fd: Relax `READ_LIMIT` on Darwin Darwin's `read`/`write` syscalls emit `EINVAL` only when `nbyte > INT_MAX`. The case `nbyte == INT_MAX` is valid, so the subtraction (`- 1`) in ```rust const READ_LIMIT: usize = if cfg!(target_vendor = "apple") { libc::c_int::MAX as usize - 1 // <- HERE } else { libc::ssize_t::MAX as usize }; ``` can be removed. I tested that the case `nbyte == INT_MAX` is valid on various versions of macOS, including old one like Mac OS X 10.5. The man page says: - read() and pread() will fail if the parameter nbyte exceeds INT_MAX (link: https://keith.github.io/xcode-man-pages/read.2.html) - write() and pwrite() will fail if the parameter nbyte exceeds INT_MAX (link: https://keith.github.io/xcode-man-pages/write.2.html) Here are links to Darwin's code: - [macOS 15.5] https://github.com/apple-oss-distributions/xnu/blob/e3723e1f17661b24996789d8afc084c0c3303b26/bsd/kern/sys_generic.c#L307 - [Mac OS X 10.2] https://github.com/apple/darwin-xnu/blob/d738f900846ed2d5f685e18bf85ce63b0176f61a/bsd/kern/sys_generic.c#L220 Related PR: rust-lang/rust#38622.
2025-08-23Rollup merge of #143898 - ognevny:opt-dist-rustc-rebuild, r=KobzolSamuel Tardieu-2/+14
opt-dist: rebuild rustc when doing static LLVM builds when building LLVM it's obvious that in case of shared build rustc doesn't need to be recompiled, but with static builds it would be better to compile rustc again to ensure we linked proper library. maybe I didn't understand the pipeline correctly, but it was strange for me to see that in Stage 5 LLVM is built while rustc is not r? ```@Kobzol``` try-job: dist-x86_64-msvc try-job: dist-x86_64-linux
2025-08-23Auto merge of #145706 - lcnr:uniquification, r=BoxyUwUbors-128/+168
change HIR typeck region uniquification handling approach rust-lang/rust#144405 causes structural lookup of opaque types to not work during HIR typeck, so instead avoid uniquifying goals and instead only reprove them if MIR borrowck actually encounters an error. This doesn't perfectly maintain the property that HIR typeck succeeding implies that MIR typeck succeeds, instead weakening this check to only guarantee that HIR typeck implies that MIR typeck succeeds modulo region uniquification. This means we still get the actually desirable ICEs if we MIR building is broken or we forget to check some property in HIR typeck, without having to deal with the fallout of uniquification in HIR typeck itself. We report errors using the original obligation sources of HIR typeck so diagnostics aren't that negatively impacted either. Here's the history of region uniquification while working on the new trait solver: - rust-lang/rust#107981 - rust-lang/rust#110180 - rust-lang/rust#114117 - rust-lang/rust#130821 - rust-lang/rust#144405 - rust-lang/rust#145706 <- we're here :tada: r? `@BoxyUwU`
2025-08-23bootstrap.py: Improve CPU detection on NetBSD,Havard Eidnes-1/+12
...and add adaptation of detection for some arm variants.
2025-08-23std library: use execinfo library also on NetBSD.Havard Eidnes-0/+1
2025-08-23Activate `range-diff` feature of triagebot (#15538)Philipp Krones-0/+3
This [feature](https://forge.rust-lang.org/triagebot/range-diff.html) shows the changes when a PR is rebased, while the GitHub UI would mix the actual changes with the ones coming from the rebase. changelog: none r? @flip1995
2025-08-23Remove chunk size from each chunk.Camille GILLOT-135/+162
2025-08-23Fix ICE when validating transmuting ZST to inhabited enumSamuel Tardieu-0/+41
MIR validation attempts to determine the number of bytes needed to represent the size of the source type to compute the discriminant for the inhabited target enum. For a ZST source, there is no source data to use as a discriminant so no proper runtime check can be generated. Since that should never be possible, insert a delayed bug to ensure the problem has been properly reported to the user by the type checker.
2025-08-23NitsMichael Goulet-71/+72
2025-08-23Implement some more checks for `ptr_guaranteed_cmp` in consteval:Zachary S-45/+311
Pointers with different residues modulo their least common allocation alignment are never equal. Pointers to the same static allocation are equal if and only if they have the same offset. Strictly in-bounds (in-bounds and not one-past-the-end) pointers to different static allocations are always unequal. A pointer cannot be equal to an integer if `ptr-int` cannot be null. Also adds more tests for `ptr_guaranteed_cmp`. Co-authored-by: Ralf Jung <post@ralfj.de>
2025-08-23Auto merge of #145567 - clubby789:cargo_update, r=clubby789bors-149/+155
Weekly `cargo update` (with libc pin) Supersedes rust-lang/rust#145516 Manually pins libc for `compiler` and `rustbook` (both of which use rustix), with fixmes to remove this later. ``` compiler & tools dependencies: Locking 28 packages to latest compatible versions Updating anyhow v1.0.98 -> v1.0.99 Updating bitflags v2.9.1 -> v2.9.2 Updating clap v4.5.43 -> v4.5.45 Updating clap_builder v4.5.43 -> v4.5.44 Updating clap_derive v4.5.41 -> v4.5.45 Updating curl v0.4.48 -> v0.4.49 Updating curl-sys v0.4.82+curl-8.14.1 -> v0.4.83+curl-8.15.0 Updating cxx v1.0.166 -> v1.0.168 Updating cxx-build v1.0.166 -> v1.0.168 Updating cxxbridge-cmd v1.0.166 -> v1.0.168 Updating cxxbridge-flags v1.0.166 -> v1.0.168 Updating cxxbridge-macro v1.0.166 -> v1.0.168 Updating glob v0.3.2 -> v0.3.3 Updating object v0.37.2 -> v0.37.3 Updating proc-macro2 v1.0.95 -> v1.0.101 Updating rayon v1.10.0 -> v1.11.0 Updating rayon-core v1.12.1 -> v1.13.0 Updating serde-untagged v0.1.7 -> v0.1.8 Updating socket2 v0.5.10 -> v0.6.0 Updating syn v2.0.104 -> v2.0.106 Updating thiserror v2.0.12 -> v2.0.15 Updating thiserror-impl v2.0.12 -> v2.0.15 Updating uuid v1.17.0 -> v1.18.0 Updating wasm-encoder v0.236.0 -> v0.236.1 Updating wasmparser v0.236.0 -> v0.236.1 Updating wast v236.0.0 -> v236.0.1 Updating wat v1.236.0 -> v1.236.1 note: pass `--verbose` to see 35 unchanged dependencies behind latest library dependencies: Locking 2 packages to latest compatible versions Updating libc v0.2.174 -> v0.2.175 Updating object v0.37.2 -> v0.37.3 note: pass `--verbose` to see 2 unchanged dependencies behind latest rustbook dependencies: Locking 13 packages to latest compatible versions Updating anyhow v1.0.98 -> v1.0.99 Updating bitflags v2.9.1 -> v2.9.2 Updating cc v1.2.32 -> v1.2.33 Updating clap v4.5.43 -> v4.5.45 Updating clap_builder v4.5.43 -> v4.5.44 Updating clap_complete v4.5.56 -> v4.5.57 Updating clap_derive v4.5.41 -> v4.5.45 Updating proc-macro2 v1.0.95 -> v1.0.101 Updating syn v2.0.104 -> v2.0.106 Updating terminal_size v0.4.2 -> v0.4.3 Updating thiserror v2.0.12 -> v2.0.15 Updating thiserror-impl v2.0.12 -> v2.0.15 ```
2025-08-23Account for impossible bounds making seemingly unsatisfyable dyn-to-dyn castsMichael Goulet-11/+38
2025-08-23`entry`: link to `Entry` API if can't make a suggestion (#15546)Samuel Tardieu-2/+17
For https://github.com/rust-lang/rust-clippy/issues/11598 changelog: [`entry`] link to `Entry` API if can't make a suggestion
2025-08-23Enable LLVM download from CI for gnullvm distMateusz Mikuła-20/+2
It no longer fails with an error locally.
2025-08-23Enable LLVM tools for gnullvm distMateusz Mikuła-12/+4
This issue has been fixed by <https://github.com/rust-lang/rust/pull/145763>.
2025-08-23`entry`: link to `Entry` API if can't make a suggestionAda Alakbarova-2/+17
2025-08-23Check config options in test suite (#15397)Philipp Krones-4/+30
Check that all configuration options reference existing lints. This was prompted by a discussion on a PR review in which a non-detected discrepancy was introduced. While adding and testing this test, references to two non-existing lints were removed. This test doesn't run as part of the rustc test suite. changelog: none
2025-08-23simplify `too_many_args` (#15462)Samuel Tardieu-29/+10
just a clean-up changelog: none
2025-08-23fix visibility of private gettersConnor Tsui-3/+6
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
2025-08-23move `WaitTimeoutResult` up to `mod.rs`Connor Tsui-137/+68
Since `WaitTimeoutResult` is poison-agnostic, we want to use the same type for both variants of `Condvar`. Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
2025-08-23change `Barrier` implementation to use `nonpoison::Condvar`Connor Tsui-5/+3
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
2025-08-23add nonpoison and poison condvar testsConnor Tsui-195/+241
Adds tests for the `nonpoison::Mutex` variant by using a macro to duplicate the existing `poison` tests. Note that all of the tests here are adapted from the existing `poison` tests. Also steals the `test_mutex_arc_condvar` test from `mutex.rs`. Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
2025-08-23add `nonpoison::condvar` implementationConnor Tsui-2/+524
Adds the equivalent `nonpoison` types to the `poison::condvar` module. These types and implementations are gated under the `nonpoison_condvar` feature gate. Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
2025-08-23simplify `too_many_args`Ada Alakbarova-29/+10
import `FnKind` completely save `header` as an intermediate variable match on `header.abi` directly use `FnKind::header` nest `if`s use `cx.tcx.def_span`, as recommended in https://github.com/rust-lang/rust-clippy/pull/15461#discussion_r2269961969
2025-08-23Fix STD build failing for target_os = espidfivmarkov-2/+11
2025-08-23Detect infinite loop in `async fn` not returning `!` (#15545)dswij-3/+33
This fixes an overzealous change made to avoid signaling infinite loops in anonymous blocks that may never be used. Fixes rust-lang/rust-clippy#15541 r? @dswij changelog: none
2025-08-23Auto merge of #145771 - weihanglo:update-cargo, r=weihanglobors-0/+0
Update cargo submodule 12 commits in 71eb84f21aef43c07580c6aed6f806a6299f5042..623d536836b4cde09ce38609232a024d5b25da81 2025-08-17 17:18:56 +0000 to 2025-08-22 19:05:52 +0000 - test(frontmatter): Match test updates in rustc (rust-lang/cargo#15878) - chore: fix some typos in comment (rust-lang/cargo#15877) - Add Arm64 Windows CI jobs (rust-lang/cargo#15790) - suggest workspace hints for boolean dependencies (rust-lang/cargo#15507) - make `UnitGenerator` public in cargo-as-a-library (rust-lang/cargo#15873) - Linting system (rust-lang/cargo#15865) - Switch to using native mdbook fragment redirects (rust-lang/cargo#15861) - docs(profile): revert wrong statement of lto options' optimization (rust-lang/cargo#15855) - docs: avoid ambiguity between update and fetch (rust-lang/cargo#15860) - docs: mention how Cargo fetch git submodules (rust-lang/cargo#15853) - feat(unstable): Added `-Zbuild-dir-new-layout` unstable feature (rust-lang/cargo#15848) - Implement `host`-target substitution (rust-lang/cargo#15838) r? ghost
2025-08-23Allow running rust-installer (and other tools) multiple times with the same ↵Jakub Beránek-0/+4
arguments
2025-08-23Use correct mode when printing a build message for std documentationJakub Beránek-1/+1
2025-08-23Merge pull request #4524 from Stypox/tracing-chrome-overhead-rdtscRalf Jung-78/+283
Account for time spent tracing, use RDTSC for faster time
2025-08-23citool: cleanup `mismatched_lifetime_syntaxes` warningsSamuel Tardieu-3/+3