about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-07-14Rollup merge of #143901 - compiler-errors:region-constraint-nits, r=lcnrSamuel Tardieu-24/+19
Region constraint nits Couple miscellaneous region constraints that have a bit to do with rust-lang/rust#143545 but stand on their own.
2025-07-14Rollup merge of #143870 - jieyouxu:compiletest-maintenance-6, r=KobzolSamuel Tardieu-20/+44
[COMPILETEST-UNTANGLE 6/N] Use `TestSuite` enum instead of stringly-typed test suites This is part of a patch series to untangle `compiletest` to hopefully nudge it towards being more maintainable. This PR should contain no functional changes.
2025-07-14Rollup merge of #143868 - jdonszelmann:fix-align-on-fields, r=workingjubileeSamuel Tardieu-6/+34
warn on align on fields to avoid breaking changes r? `@workingjubilee`
2025-07-14Rollup merge of #143855 - JonathanBrouwer:omit_gdb_pretty_printer_section, ↵Samuel Tardieu-13/+29
r=jdonszelmann Port `#[omit_gdb_pretty_printer_section]` to the new attribute parsing Ports `#[omit_gdb_pretty_printer_section]` to the new attribute parsing infrastructure for https://github.com/rust-lang/rust/issues/131229#issuecomment-2971351163 r? ```@jdonszelmann```
2025-07-14Rollup merge of #143848 - makai410:smir-rename, r=oli-obkSamuel Tardieu-267/+277
Rename `stable_mir` and `rustc_smir` This PR only renames the two crate names. There is no doubt that we want to rename `stable_mir` to `rustc_public`, while it hasn't been discussed yet that what the new name for `rustc_smir` should be. This PR proposes a new name for `rustc_smir`, that is `rustc_public_shim`, since `rustc_smir` now is mostly a proxy to do calls to rustc queries and the public API of rustc that is invoked by the `rustc_public` crate. However, I don't think that name is good enough. I hope there would be a way better name. r? `@oli-obk`
2025-07-14Rollup merge of #143710 - joshtriplett:random-updates, r=joshtriplettSamuel Tardieu-60/+35
Updates to random number generation APIs Updates based on discussions about random number generation. - Add comment on `RandomSource::fill_bytes` about multiple calls, to allow efficient implementations for random sources that generate a word at a time. - Drop the `Random` trait in favor of `Distribution<T>`, which will let people make calls like random(1..=6), and which allows for future expansion to non-uniform distributions, as well as floating-point. (For now, this is only implemented for `RangeFull`, to get the interface in place. Subsequent PRs will implement it for other range types.)
2025-07-14Rollup merge of #141809 - ChrisDenton:no-cleaup, r=jhprattSamuel Tardieu-15/+21
Don't call WSACleanup on process exit This isn't necessary as cleanup will happen when the process exits regardless. fixes rust-lang/rust#141799
2025-07-14`useless_conversion`: move all the impl to the same lint passJason Newcomb-30/+27
2025-07-14`s390x`: document the different rounding flavorsFolkert de Vries-3/+14
2025-07-14`ineffective_open_options`: remove `method_call` use (#15271)Samuel Tardieu-47/+51
This is needed to split the lint crate. changelog: none
2025-07-14Fix expect_fun_call producing invalid suggestions (#15122)Samuel Tardieu-135/+135
Previously expect_fun_call would too eagerly convert cases like `foo.expect(if | block | match)` into `foo.unwrap_or_else`. Additionally, it would also add to_string() even though the argument is being passed into format!() which can accept a &str. I also discovered some other cases where this lint would either produce invalid results, or be triggered unnecessarily: - Clippy would suggest changing expect to unwrap_or_else even if the expression inside expect contains a return statement - opt.expect(const_fn()) no longer triggers the lint - The lint would always add braces to the closure body, even if the body of expect is a single expression - opt.expect({"literal"}) used to get turned into ```opt.unwrap_or_else(|| panic!("{}", {"literal"}.to_string()))``` Fixes rust-lang/rust-clippy#15056 changelog: [`expect_fun_call`]: fix expect_fun_call producing invalid suggestions
2025-07-14`ineffective_open_options`: don't subtract a constant `BytePos`Jason Newcomb-2/+12
2025-07-14fix: `search_is_some` suggests wrongly inside macroyanglsh-5/+73
2025-07-14Don't call WSACleanup on process exitChris Denton-15/+21
2025-07-14expect_fun_call: only lint const fn's if they're not inside a const contextKamal Ahmad-9/+43
2025-07-14Reword mismatched-lifetime-syntaxes text based on feedbackJake Goulding-6/+7
Key changes include: - Removal of the word "syntax" from the lint message. More accurately, it could have been something like "syntax group" or "syntax category", but avoiding it completely is easier. - The primary lint message now reflects exactly which mismatch is occurring, instead of trying to be general. A new `help` line is general across the mismatch kinds. - Suggestions have been reduced to be more minimal, no longer also changing non-idiomatic but unrelated aspects. - Suggestion text no longer mentions changes when those changes don't occur in that specific suggestion.
2025-07-14Reword mismatched-lifetime-syntaxes text based on feedbackJake Goulding-419/+680
Key changes include: - Removal of the word "syntax" from the lint message. More accurately, it could have been something like "syntax group" or "syntax category", but avoiding it completely is easier. - The primary lint message now reflects exactly which mismatch is occurring, instead of trying to be general. A new `help` line is general across the mismatch kinds. - Suggestions have been reduced to be more minimal, no longer also changing non-idiomatic but unrelated aspects. - Suggestion text no longer mentions changes when those changes don't occur in that specific suggestion.
2025-07-14Fix `ptr_arg` suggests changes when it's actually better not to botherimmersum-42/+179
changelog: fix false positive: [`ptr_arg`] no longer triggers with underscore binding to `&mut` argument
2025-07-14Preserve constness in trait objects up to hir ty loweringOli Scherer-3/+27
2025-07-14`ineffective_open_options`: refactor, don't use `method_call`Jason Newcomb-47/+41
2025-07-14Auto merge of #143919 - Kobzol:rollup-acyaygs, r=Kobzolbors-725/+665
Rollup of 10 pull requests Successful merges: - rust-lang/rust#143217 (Port #[link_ordinal] to the new attribute parsing infrastructure) - rust-lang/rust#143681 (bootstrap/miri: avoid rebuilds for test builds) - rust-lang/rust#143724 (Tidy cleanup) - rust-lang/rust#143733 (Change bootstrap's `tool.TOOL_NAME.features` to work on any subcommand) - rust-lang/rust#143850 (Compiletest: Simplify {Html,Json}DocCk directive handling) - rust-lang/rust#143875 (update issue number for `const_trait_impl`) - rust-lang/rust#143881 (Use zero for initialized Once state) - rust-lang/rust#143887 (Run bootstrap tests sooner in the `x test` pipeline) - rust-lang/rust#143917 (Change "allocated object" to "allocation".) - rust-lang/rust#143918 (Tier check cleanup) r? `@ghost` `@rustbot` modify labels: rollup
2025-07-14Add experimental backtrace-trace-only std featureChris Denton-47/+57
2025-07-14Use `TestSuite` enum instead of stringly-typed test suitesJieyou Xu-20/+44
2025-07-14rename `stable_mir` to `rustc_public`, and `rustc_smir` to `rustc_public_bridge`Makai-267/+277
2025-07-14Rollup merge of #143918 - hkBst:tier-check-cleanup, r=KobzolJakub Beránek-9/+7
Tier check cleanup clippy cleanup + edition 2024
2025-07-14Rollup merge of #143917 - theemathas:change-allocated-object-to-allocation, ↵Jakub Beránek-3/+3
r=oli-obk Change "allocated object" to "allocation". These seem like they were missed in <https://github.com/rust-lang/rust/pull/141224>
2025-07-14Rollup merge of #143887 - Kobzol:reroder-bootstrap-tests, r=jieyouxuJakub Beránek-2/+1
Run bootstrap tests sooner in the `x test` pipeline With the recently added bootstrap snapshot tests, and in general with our plans to test more things in bootstrap, I feel like the original comment isn't accurate anymore. Recently, on several occasions I had to wait for 40+ minutes of CI just to find out that the bootstrap snapshot tests have failed. I think we should run bootstrap tests towards the beginning instead now. r? ```@jieyouxu```
2025-07-14Rollup merge of #143881 - orlp:once-state-repr, r=tgross35Jakub Beránek-9/+12
Use zero for initialized Once state By re-labeling which integer represents which internal state for `Once` we can ensure that the initialized state is the all-zero state. This is beneficial because some CPU architectures (such as Arm) have specialized instructions to specifically branch on non-zero, and checking for the initialized state is by far the most important operation. As an example, take this: ```rust use std::sync::atomic::{AtomicU32, Ordering}; const INIT: u32 = 3; #[inline(never)] #[cold] pub fn slow(state: &AtomicU32) { state.store(INIT, Ordering::Release); } pub fn ensure_init(state: &AtomicU32) { if state.load(Ordering::Acquire) != INIT { slow(state) } } ``` If `INIT` is 3 (as is currently the state for `Once`), we see the following assembly on `aarch64-apple-darwin`: ```asm example::ensure_init::h332061368366e313: ldapr w8, [x0] cmp w8, #3 b.ne LBB1_2 ret LBB1_2: b example::slow::ha042bd6a4f33724e ``` By changing the `INIT` state to zero we get the following: ```asm example::ensure_init::h332061368366e313: ldapr w8, [x0] cbnz w8, LBB1_2 ret LBB1_2: b example::slow::ha042bd6a4f33724e ``` So this PR saves 1 instruction every time a `LazyLock` gets accessed on platforms such as these.
2025-07-14Rollup merge of #143875 - fee1-dead-contrib:push-zvqrmzrprpzt, r=compiler-errorsJakub Beránek-67/+67
update issue number for `const_trait_impl` r? project-const-traits cc rust-lang/rust#67792 rust-lang/rust#143874
2025-07-14Rollup merge of #143850 - fmease:comptest-simp-docck-handling, r=jieyouxuJakub Beránek-359/+294
Compiletest: Simplify {Html,Json}DocCk directive handling So much more maintainable and extensible. r? ````@jieyouxu```` as discussed
2025-07-14Rollup merge of #143733 - Stypox:bootstrap-tool-config-any, r=KobzolJakub Beránek-16/+23
Change bootstrap's `tool.TOOL_NAME.features` to work on any subcommand This is a followup to rust-lang/rust#142379 to make the bootstrap option `tool.TOOL_NAME.features` work on any subcommand instead of just build (so also run/test/...). I also made the `TOOL_NAME` comparisons look at the tool path instead of the tool name to determine to which tool a `TOOL_NAME` refers to, so you can specify tools by path like in other places of the bootstrap (e.g. `tool."tools/miri".features`).
2025-07-14Rollup merge of #143724 - hkBst:tidy-cleanup, r=Mark-SimulacrumJakub Beránek-108/+91
Tidy cleanup
2025-07-14Rollup merge of #143681 - RalfJung:bootstrap-miri-rebuilds, r=KobzolJakub Beránek-2/+8
bootstrap/miri: avoid rebuilds for test builds When building Miri in its own repo, we always build with `--all-targets`: https://github.com/rust-lang/rust/blob/a00961269107703772c4e8f071f0accbe0f1a7e5/src/tools/miri/miri-script/src/util.rs#L167-L174 This saves a bunch of time since some of Miri's dependencies get more features enabled by some of Miri's dev-dependencies, and they all get built twice otherwise if you do `cargo build && cargo test` (which is typically what you end up doing inside `./miri test` and also inside `./x test miri`). This applies the same approach to bootstrap, drastically reducing the edit-compile cycle for Miri work here. :)
2025-07-14Rollup merge of #143217 - Periodic1911:link-ordinal, r=jdonszelmannJakub Beránek-150/+159
Port #[link_ordinal] to the new attribute parsing infrastructure Ports link_ordinal to the new attribute parsing infrastructure for https://github.com/rust-lang/rust/issues/131229#issuecomment-2971353197
2025-07-14Update SUMMARY.mdfuder.eth-2/+2
Update README.md
2025-07-14Auto merge of #143873 - dianqk:update-llvm, r=nikicbors-1/+1
Update LLVM to 20.1.8 I made a new branch with patches that aren't yet in LLVM 20.1.8.
2025-07-14Give all bytes of TypeId provenanceOli Scherer-34/+79
2025-07-14Fix manual is multiple of (#15205)Jason Newcomb-19/+268
Fix several issues with `manual_is_multiple_of` - `&a % &b == 0` compiles, but requires dereferencing `b` when replacing with `a.is_multiple_of(b)`. - In `a % b == 0`, if type of `a` is not certain, `a.is_multiple_of(b)` might not be typable. - In `a % b == 0`, `a` and `b` must be unsigned integers, not any arbitrary types implementing `Rem` and outputing an integer. Those fixes have required increasing the precision of type certainty determination in the two first patches. Fixes rust-lang/rust-clippy#15203 Fixes rust-lang/rust-clippy#15204 changelog: [`manual_is_multiple_of`]: fix various false positive
2025-07-14tiercheck: edition 2024Marijn Schouten-1/+1
2025-07-14Eliminate all direct uses of LLVMMDStringInContext2Oli Scherer-28/+26
2025-07-14Use context methods instead of directly calling FFIOli Scherer-25/+9
2025-07-14Merge `typeid_metadata` and `create_metadata`Oli Scherer-18/+17
2025-07-14Shrink some `unsafe` blocks in cg_llvmOli Scherer-139/+137
2025-07-14Avoid a bunch of unnecessary `unsafe` blocks in cg_llvmOli Scherer-65/+54
2025-07-14tiercheck: clippy fixesMarijn Schouten-8/+6
2025-07-14Change "allocated object" to "allocation".Tim (Theemathas) Chirananthavat-3/+3
These seem like they were missed in <https://github.com/rust-lang/rust/pull/141224>
2025-07-14Fix `manual_assert` suggests wrongly for macros (#15264)Samuel Tardieu-3/+54
Closes rust-lang/rust-clippy#15227 changelog: [`manual_assert`] fix wrong suggestions for macros
2025-07-14fix false negative of `expect_used` (#15253)Jason Newcomb-2/+53
Fixes: rust-lang/rust-clippy#15247 changelog: Fix the false negative of [`expect_used`] when metting `Option::ok().expect`.
2025-07-14Add comment about features not part of "extra-features"Stypox-1/+2
2025-07-14Only compare tool name to apply features toStypox-1/+2