about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-03-30Improve explicitness of the impl of the `useless_ptr_null_checks` lintUrgau-26/+26
2025-03-30Expose `peel_casts` method as an util method inside `rustc_lint`Urgau-43/+57
2025-03-25Auto merge of #138923 - TaKO8Ki:rollup-f3hkmqj, r=TaKO8Kibors-155/+214
Rollup of 9 pull requests Successful merges: - #138385 (Keyword tweaks) - #138580 (resolve: Avoid some unstable iteration 2) - #138652 (Reintroduce remote-test support in run-make tests) - #138701 (Make default_codegen_backend serializable) - #138755 ([rustdoc] Remove duplicated loop when computing doc cfgs) - #138829 (Slightly reword triagebot ping message for `relnotes-interest-group`) - #138837 (resolve: Avoid remaining unstable iteration) - #138838 (Fix/tweak some tests in new solver) - #138895 (Add a helper for building an owner id in ast lowering) r? `@ghost` `@rustbot` modify labels: rollup
2025-03-25Auto merge of #136410 - saethlin:clean-up-cgu-internal-copy, r=compiler-errorsbors-64/+68
Remove InstanceKind::generates_cgu_internal_copy This PR should not contain any behavior changes. Before this PR, the logic for selecting instantiation mode is spread across all of * `instantiation_mode` * `cross_crate_inlinable` * `generates_cgu_internal_copy` * `requires_inline` The last two of those functions are not well-designed. The function that actually decides if we generate a CGU-internal copy is `instantiation_mode`, _not_ `generates_cgu_internal_copy`. The function `requires_inline` documents that it is about the LLVM `inline` attribute and that it is a hint. The LLVM attribute is called `inlinehint`, this function is also used by other codegen backends, and since it is part of instantiation mode selection it is *not* a hint. The goal of this PR is to start cleaning up the logic into a sequence of checks that have a more logical flow and are easier to customize in the future (to do things like improve incrementality or improve optimizations without causing obscure linker errors because you forgot to update another part of the compiler).
2025-03-25Rollup merge of #138895 - oli-obk:dedup-owner-id-creation, r=compiler-errorsTakayuki Maeda-16/+17
Add a helper for building an owner id in ast lowering Just some deduplication of owner-id creations. Will also help me later split up ast lowering into per-owner queries, as it won't be possible anymore to go from a NodeId to a DefId of an owner without doing extra work to check whether we have an owner id. So I'd just do that in the new `owner_id` function and keep the `local_def_id` function free of that logic
2025-03-25Rollup merge of #138838 - compiler-errors:new-solver-crashes-tweaks, r=lcnrTakayuki Maeda-35/+99
Fix/tweak some tests in new solver Bunch of miscellaneous new solver tweaks that I found from the failing tests. Can split these out, but they all seemed small enough to not warrant separate PRs. r? lcnr
2025-03-25Rollup merge of #138837 - petrochenkov:resinstab2, r=jieyouxuTakayuki Maeda-12/+6
resolve: Avoid remaining unstable iteration Continuation of #138580. This should be the performance sensitive part.
2025-03-25Rollup merge of #138829 - jieyouxu:adjust-relnotes-interest-group-desc, ↵Takayuki Maeda-2/+2
r=cuviper Slightly reword triagebot ping message for `relnotes-interest-group` Now that there's also a meta relnotes tracking issue. r? ```@cuviper``` (or release)
2025-03-25Rollup merge of #138755 - GuillaumeGomez:rm-duplicated-loop, r=camelidTakayuki Maeda-38/+21
[rustdoc] Remove duplicated loop when computing doc cfgs Working on implementing https://github.com/rust-lang/rfcs/blob/master/text/3631-rustdoc-cfgs-handling.md and found this weird case where the first loop was actually not doing anything since we were passing `cfg(...)` to `Cfg::parse` instead of `cfg(...)` items. Well, that should be a first nice cleanup before the rest comes in. cc ```@notriddle``` r? ```@camelid```
2025-03-25Rollup merge of #138701 - tvladyslav:serializable_default_codegen_backend, ↵Takayuki Maeda-0/+8
r=workingjubilee Make default_codegen_backend serializable This PR makes default_codegen_backend serializable.
2025-03-25Rollup merge of #138652 - ferrocene:pa-remote-test-rmake, r=jieyouxuTakayuki Maeda-1/+18
Reintroduce remote-test support in run-make tests The old Makefile-based infrastructure included support for executing binaries with remote-test-client if configured, but that didn't get ported to run_make_support as part of the rmake migration. This PR re-introduces back that support, with the same implementation (and limitations) of the original Makefile-based support. [Old Makefile-based implementation of this](https://github.com/rust-lang/rust/blob/9b8accbeb6336fa24d02b2a8bcaecaf44fe2bb65/tests/run-make/tools.mk#L65-L74) try-job: armhf-gnu
2025-03-25Rollup merge of #138580 - petrochenkov:resinstab, r=NadrierilTakayuki Maeda-14/+9
resolve: Avoid some unstable iteration 2 Continuation of https://github.com/rust-lang/rust/pull/138502.
2025-03-25Rollup merge of #138385 - nnethercote:keyword-tweaks, r=NoratriebTakayuki Maeda-37/+34
Keyword tweaks r? ```@Noratrieb```
2025-03-25Auto merge of #138634 - saethlin:repeated-uninit, r=scottmcm,oli-obkbors-4/+66
Lower to a memset(undef) when Rvalue::Repeat repeats uninit Fixes https://github.com/rust-lang/rust/issues/138625. It is technically correct to just do nothing. But if we actually do nothing, we may miss that this is de-initializing something, so instead we just lower to a single memset that writes undef. This is still superior to the memcpy loop, in both quality of code we hand to the backend and LLVM's final output.
2025-03-24Remove InstanceKind::generates_cgu_internal_copyBen Kimock-64/+68
2025-03-24Auto merge of #133984 - DaniPopes:scmp-ucmp, r=scottmcmbors-42/+124
Lower BinOp::Cmp to llvm.{s,u}cmp.* intrinsics Lowers `mir::BinOp::Cmp` (`three_way_compare` intrinsic) to the corresponding LLVM `llvm.{s,u}cmp.i8.*` intrinsics. These are the intrinsics mentioned in https://github.com/rust-lang/rust/pull/118310, which are now available in LLVM 19. I couldn't find any follow-up PRs/discussions about this, please let me know if I missed something. r? `@scottmcm`
2025-03-25Slightly reword triagebot ping message for `relnotes-interest-group`Jieyou Xu-2/+2
Now that there's also a meta relnotes tracking issue.
2025-03-24resolve: Avoid some unstable iteration 2Vadim Petrochenkov-14/+9
2025-03-24Auto merge of #138901 - matthiaskrgr:rollup-qbbanhr, r=matthiaskrgrbors-188/+340
Rollup of 7 pull requests Successful merges: - #138662 (Implement some basics in UEFI fs) - #138800 (remove remnants of const_box feature) - #138821 (match lowering cleanup: remove unused unsizing logic from `non_scalar_compare`) - #138864 (Rework `--print` options documentation) - #138868 (Add do_not_recommend typo help) - #138882 (`with_scope` is only ever used for ast modules) - #138894 (Update books) r? `@ghost` `@rustbot` modify labels: rollup
2025-03-24Rollup merge of #138894 - rustbot:docs-update, r=ehussMatthias Krüger-0/+0
Update books ## rust-lang/book 23 commits in 81a976a237f84b8392c4ce1bd5fd076eb757a2eb..45f05367360f033f89235eacbbb54e8d73ce6b70 2025-03-21 23:23:52 UTC to 2025-03-13 14:14:37 UTC - Ch. 21: call out Chrome multiple-connections issue (rust-lang/book#4297) - Ch. 16: refactor 16-6 to using listing component (rust-lang/book#4295) - Ch. 01: Show how to work offline (rust-lang/book#4294) - Ch. 07: Clarify sentences about `pub use` (rust-lang/book#4293) - Ch. 02: Consistent ordering of `use` statements (rust-lang/book#4292) - Anchors on listings (rust-lang/book#4271) - Ch. 17: another tweak to how we phrase things about sections (rust-lang/book#4288) - Ch. 20: correct listing number (rust-lang/book#4287) - Ch. 10.3: clarify language detail (rust-lang/book#4284) - Ch. 17: minor typos and link reference (rust-lang/book#4286) - Ch. 9: correctly demonstrate privacy with module (rust-lang/book#4282) - Ch. 18: correct discussion of delegation in `Post` methods (rust-lang/book#4281) - Ch. 20: tell folks to see the Reference for more ABI info (rust-lang/book#4165) - Ch 10.1 minor clarifications (rust-lang/book#4256) - Clarified the misunderstanding b/w crates, module, items (rust-lang/book#4232) - Ferris: always show, even when it’s small (rust-lang/book#4280) - Ch. 17: mention `use std::pin::{Pin, pin};` on introduction (rust-lang/book#4279) - Persist printing error, NOT ErrorKind (rust-lang/book#4259) - Typo: "2" should be "2 seconds" (rust-lang/book#4263) - Ch. 17: fix tiny example consistency issue (rust-lang/book#4270) - Bump ring from 0.17.8 to 0.17.13 in /listings/ch17-async-await/listing-17-02 (rust-lang/book#4261) - Bump ring from 0.17.8 to 0.17.14 in /packages/trpl (rust-lang/book#4273) - 2024 Print Edition: updates to Word docs and more fixes to Markdown text (rust-lang/book#4272) ## rust-lang/reference 5 commits in dda31c85f2ef2e5d2f0f2f643c9231690a30a626..e95ebdfee02514d93f79ec92ae310a804e87f01f 2025-03-24 15:56:46 UTC to 2025-03-18 02:25:06 UTC - Fix diagnostic attribute typo (rust-lang/reference#1767) - Mention that “every address” ≠ “every pointer” (rust-lang/reference#1761) - Rework range pattern rules (rust-lang/reference#1756) - Use warning block in behavior-considered-undefined (rust-lang/reference#1759) - Add reference for asm-goto (rust-lang/reference#1693)
2025-03-24Rollup merge of #138882 - oli-obk:ast-lowering-mod-rib, r=fee1-deadMatthias Krüger-14/+11
`with_scope` is only ever used for ast modules Thus I renamed it to match other similar functions (`with_mod_rib`) and made it panic if used on non-modules
2025-03-24Rollup merge of #138868 - mejrs:d_not_recommend_typo, r=davidtwcoMatthias Krüger-8/+25
Add do_not_recommend typo help
2025-03-24Rollup merge of #138864 - Urgau:rework-print-options-doc, r=jieyouxuMatthias Krüger-52/+214
Rework `--print` options documentation This PR reworks the `--print` options documentation, by making it more like codegen options with a dedicated page. I also added some examples and split some paragraph into multiple paragraph since we now have more place. r? ```@jieyouxu```
2025-03-24Rollup merge of #138821 - dianne:cleanup-non-scalar-compare, r=oli-obkMatthias Krüger-94/+24
match lowering cleanup: remove unused unsizing logic from `non_scalar_compare` Since array and slice constants are now translated to array and slice patterns, `non_scalar_compare` is only used for string comparisons. This specializes it to strings, renames it, and removes the unused array-unsizing logic. This also updates the doc comments for `thir::PatKind::Constant` and `TestKind::Eq`, which referred to them being used for slice references. r? ````@oli-obk````
2025-03-24Rollup merge of #138800 - RalfJung:const_box, r=oli-obkMatthias Krüger-8/+4
remove remnants of const_box feature This feature requires major design work, and the few methods it gates currently aren't actually useful. Let's reset to a clean slate so when a design materializes, we can start from scratch. Closes https://github.com/rust-lang/rust/issues/92521 by removing the feature it tracks. r? ````@oli-obk````
2025-03-24Rollup merge of #138662 - Ayush1325:uefi-fs-1, r=nicholasbishop,petrochenkovMatthias Krüger-12/+62
Implement some basics in UEFI fs - Just getting some basics out of the way while waiting for #138236 to be merged. - Adds `fs::canonicalize`. Should be same as absolute in case of UEFI since there is no symlink support and absolute path is guaranteed to be uniqe according to spec. - Make `fs::lstat` same as `fs::stat`. Should be same since UEFI does not have symlink support. - Implement `OptionOptions`. cc ````@nicholasbishop```` ````@dvdhrm````
2025-03-24Update booksrustbot-0/+0
2025-03-24Mark a fixed testMichael Goulet-3/+8
2025-03-24Don't ICE when encountering placeholders in layout computationMichael Goulet-14/+24
2025-03-24Don't mark privacy test as needing GCEMichael Goulet-11/+10
2025-03-24Allow WellFormed goals to be returned from relating in new solverMichael Goulet-7/+57
2025-03-24Add a helper for building an owner id in ast loweringOli Scherer-16/+17
2025-03-24Auto merge of #138629 - Zoxc:graph-anon-hashmap, r=oli-obkbors-62/+155
Only use the new node hashmap for anonymous nodes This is a rebase of https://github.com/rust-lang/rust/pull/112469. cc `@cjgillot`
2025-03-24Auto merge of #115747 - Zoxc:query-hashes, r=oli-obkbors-30/+48
Optimize hash map operations in the query system This optimizes hash map operations in the query system by explicitly passing hashes and using more optimal operations. `find_or_find_insert_slot` in particular saves a hash table lookup over `entry`. It's not yet available in a safe API, but will be in https://github.com/rust-lang/hashbrown/pull/466. <table><tr><td rowspan="2">Benchmark</td><td colspan="1"><b>Before</b></th><td colspan="2"><b>After</b></th></tr><tr><td align="right">Time</td><td align="right">Time</td><td align="right">%</th></tr><tr><td>🟣 <b>clap</b>:check</td><td align="right">1.6189s</td><td align="right">1.6129s</td><td align="right"> -0.37%</td></tr><tr><td>🟣 <b>hyper</b>:check</td><td align="right">0.2353s</td><td align="right">0.2337s</td><td align="right"> -0.67%</td></tr><tr><td>🟣 <b>regex</b>:check</td><td align="right">0.9344s</td><td align="right">0.9289s</td><td align="right"> -0.59%</td></tr><tr><td>🟣 <b>syn</b>:check</td><td align="right">1.4693s</td><td align="right">1.4652s</td><td align="right"> -0.28%</td></tr><tr><td>🟣 <b>syntex_syntax</b>:check</td><td align="right">5.6606s</td><td align="right">5.6439s</td><td align="right"> -0.30%</td></tr><tr><td>Total</td><td align="right">9.9185s</td><td align="right">9.8846s</td><td align="right"> -0.34%</td></tr><tr><td>Summary</td><td align="right">1.0000s</td><td align="right">0.9956s</td><td align="right"> -0.44%</td></tr></table> r? `@cjgillot`
2025-03-24ignore tests broken while cross compilingPietro Albini-0/+4
2025-03-24Remove duplicated loop when computing doc cfgsGuillaume Gomez-38/+21
2025-03-24`with_scope` is only ever used for ast modulesOli Scherer-14/+11
2025-03-24Move `is_used_keyword_conditional`.Nicholas Nethercote-4/+4
So the order of the `Symbol::is_*` predicates match the order of the keywords list.
2025-03-24Alphabetize the keywords list.Nicholas Nethercote-8/+21
2025-03-24Fix some formatting.Nicholas Nethercote-2/+2
2025-03-24Improve keyword comments a little.Nicholas Nethercote-5/+4
2025-03-24Remove `is_any_keyword` methods.Nicholas Nethercote-23/+8
They're dodgy, covering all the keywords, including weak ones, and edition-specific ones without considering the edition. They have a single use in rustfmt. This commit changes that use to `is_reserved_ident`, which is a much more widely used alternative and is good enough, judging by the lack of effect on the test suite.
2025-03-24Auto merge of #138878 - jieyouxu:revert-ci-llvm, r=dianqkbors-9/+1
Revert "fix download-llvm logic for subtree sync branches #137593" Reverts #137593. Looks like unfortunately the `--diff-merges=first-parent` flag is a `git show`-only flag, not `git rev-list` which only accepts `--first-parent`. See https://git-scm.com/docs/git-rev-list#Documentation/git-rev-list.txt---first-parent which has `--first-parent`, versus https://git-scm.com/docs/git-show#Documentation/git-show.txt---diff-mergesltformatgt which has `--diff-merges=first-parent`. This reverts commit 95994f94ff5c9335426af4dec19afb5024f82fab, reversing changes made to 7290b04b0a46de2118968aa556bfc0970aac6661. This will unfortunately re-open https://github.com/rust-lang/rust/issues/101907 but that isn't fixed anyway since the git invocation is broken. cc `@RalfJung` `@Mark-Simulacrum` for FYI (but I would've written the same incorrect flag 💀) r? `@onur-ozkan` (or bootstrap or infra or anyone really)
2025-03-24Revert "Rollup merge of #137593 - RalfJung:subtree-sync-download-llvm, ↵Jieyou Xu-9/+1
r=Mark-Simulacrum" Looks like unfortunately the `--diff-merges` flag is a `git show`-only command, not `git rev-list`. This reverts commit 95994f94ff5c9335426af4dec19afb5024f82fab, reversing changes made to 7290b04b0a46de2118968aa556bfc0970aac6661.
2025-03-24std: fs: uefi: Implement OpenOptionsAyush Singh-8/+58
UEFI does not have specific modes for create_new, truncate and append. So those need to to be simulated after opening the file. Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2025-03-24std: fs: uefi: Make lstat call statAyush Singh-2/+2
- UEFI does not have symlinks. So lstat and stat should behave the same. Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2025-03-24std: fs: uefi: Implement canonicalizeAyush Singh-2/+2
- Should be same as absolute in UEFI since there are no symlinks. - Also each absolute path representation should be unique according to the UEFI specification. Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2025-03-24Auto merge of #138873 - jhpratt:rollup-tggrbxl, r=jhprattbors-239/+859
Rollup of 10 pull requests Successful merges: - #137593 (fix download-llvm logic for subtree sync branches) - #137736 (Don't attempt to export compiler-builtins symbols from rust dylibs) - #138135 (Simplify `PartialOrd` on tuples containing primitives) - #138321 ([bootstrap] Distribute split debuginfo if present) - #138574 (rustdoc: be more strict about "Methods from Deref") - #138606 (Fix missing rustfmt in msi installer - cont) - #138671 (Fix `FileType` `PartialEq` implementation on Windows) - #138728 (Update `compiler-builtins` to 0.1.152) - #138783 (Cache current_dll_path output) - #138846 (Tweaks to writeback and `Obligation -> Goal` conversion) Failed merges: - #138755 ([rustdoc] Remove duplicated loop when computing doc cfgs) r? `@ghost` `@rustbot` modify labels: rollup
2025-03-23Rollup merge of #138846 - compiler-errors:stall-prereqs, r=lcnrJacob Pratt-36/+49
Tweaks to writeback and `Obligation -> Goal` conversion Each of these commits are self-contained, but are prerequisites that I'd like to land before #138845, which still needs some cleaning. The ""most controversial"" one is probably [Explicitly don't fold coroutine obligations in writeback](https://github.com/rust-lang/rust/commit/e7d27bae27b3b213a44e12b780e5df74a9929e58), which I prefer because I think using `fold_predicate` to control against not normalizing predicates seems... easy to mess up 🤔, and we could have *other things* that we don't want to normalize. Explicitly noting whether we want `resolve` to normalize is a lot clearer (and currently in writeback is limited to resolving stalled coroutine obligations), since we can attach it to a comment that explains *why*.
2025-03-23Rollup merge of #138783 - bjorn3:cache_current_dll_path, r=lqdJacob Pratt-56/+66
Cache current_dll_path output Computing the current dll path is somewhat expensive relative to other work when compiling `fn main() {}` as `dladdr` needs to iterate over the symbol table of librustc_driver.so until it finds a match.