about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-03-19Outline some cold code and turn on hash collision detection with ↵John Kåre Alsaker-16/+21
debug_assertions
2025-03-19Only use the new node hashmap for anonymous nodes.Camille GILLOT-55/+110
2025-03-19Auto merge of #122156 - Zoxc:side-effect-dep-node, r=oli-obkbors-206/+185
Represent diagnostic side effects as dep nodes This changes diagnostic to be tracked as a special dep node (`SideEffect`) instead of having a list of side effects associated with each dep node. `SideEffect` is always red and when forced, it emits the diagnostic and marks itself green. Each emitted diagnostic generates a new `SideEffect` with an unique dep node index. Some implications of this: - Diagnostic may now be emitted more than once as they can be emitted once when the `SideEffect` gets marked green and again if the task it depends on needs to be re-executed due to another node being red. It relies on deduplicating of diagnostics to avoid that. - Anon tasks which emits diagnostics will no longer *incorrectly* be merged with other anon tasks. - Reusing a CGU will now emit diagnostics from the task generating it.
2025-03-19Auto merge of #138693 - matthiaskrgr:rollup-ejq8mwp, r=matthiaskrgrbors-923/+517
Rollup of 10 pull requests Successful merges: - #136177 (clarify BufRead::{fill_buf, consume} docs) - #138654 (Remove the regex dependency from coretests) - #138655 (rustc-dev-guide sync) - #138656 (Remove double nesting in post-merge workflow) - #138658 (CI: mirror alpine and centos images to ghcr) - #138659 (coverage: Don't store a body span in `FunctionCoverageInfo`) - #138661 (Revert: Add *_value methods to proc_macro lib) - #138670 (Remove existing AFIDT implementation) - #138674 (Various codegen_llvm cleanups) - #138684 (use then in docs for `fuse` to enhance readability) r? `@ghost` `@rustbot` modify labels: rollup
2025-03-19Auto merge of #138653 - matthiaskrgr:rollup-fwwqmr7, r=matthiaskrgrbors-59/+254
Rollup of 7 pull requests Successful merges: - #136320 (exit: document interaction with C) - #138080 (Leave a breadcrumb towards bootstrap config documentation in `bootstrap.toml`) - #138301 (Implement `read_buf` for Hermit) - #138569 (rustdoc-json: Add tests for `#[repr(...)]`) - #138635 (Extract `for_each_immediate_subpat` from THIR pattern visitors) - #138642 (Unvacation myself) - #138644 (Add `#[cfg(test)]` for Transition in dfa in `rustc_transmute`) r? `@ghost` `@rustbot` modify labels: rollup
2025-03-19Rollup merge of #138684 - bend-n:use_then, r=jhprattMatthias Krüger-5/+1
use then in docs for `fuse` to enhance readability use the more-idiomatic `then_some` rather than an `if { some } else { none }` for `fused` docs
2025-03-19Rollup merge of #138674 - oli-obk:llvm-cleanups, r=compiler-errorsMatthias Krüger-205/+206
Various codegen_llvm cleanups Mostly just adding safe wrappers and deduplicating code
2025-03-19Rollup merge of #138670 - compiler-errors:remove-afidt, r=oli-obkMatthias Krüger-301/+177
Remove existing AFIDT implementation This experiment will need to be reworked differently; I don't think we'll be going with the `dyn* Future` approach that is currently implemented. r? oli-obk Fixes #136286 Fixes #137706 Fixes #137895 Tracking: * #133119
2025-03-19Rollup merge of #138661 - RalfJung:revert-rustc-dev-breakage, r=petrochenkovMatthias Krüger-253/+15
Revert: Add *_value methods to proc_macro lib This reverts https://github.com/rust-lang/rust/pull/136355. That PR caused unexpected breakage: - the rustc-dev component can no longer be loaded by cargo, which impacts Miri and clippy and likely others - rustc_lexer can no longer be published to crates.io, which impacts RA See https://github.com/rust-lang/rust/issues/138647 for context. Cc `@GuillaumeGomez` `@Amanieu`
2025-03-19Rollup merge of #138659 - Zalathar:no-body-span, r=oli-obkMatthias Krüger-45/+23
coverage: Don't store a body span in `FunctionCoverageInfo` We aren't using this body span for anything truly essential, and having it around will be awkward when we eventually start to support expansion regions, since they aren't necessarily within the main body.
2025-03-19Rollup merge of #138658 - marcoieni:mirror-alpine-and-centos, r=KobzolMatthias Krüger-0/+7
CI: mirror alpine and centos images to ghcr
2025-03-19Rollup merge of #138656 - Kobzol:post-merge-unnest, r=marcoieniMatthias Krüger-12/+4
Remove double nesting in post-merge workflow See [this](https://github.com/rust-lang/rust/pull/138630#issuecomment-2732224491) :) Can be tested with: ```bash #!/bin/bash PARENT_COMMIT=493c38ba371929579fe136df26eccd9516347c7a SHA=259fdb521200c9abba547302fc2c826479ef26b2 printf "<details>\n<summary>What is this?</summary>\n" >> output.log printf "This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.\n" >> output.log printf "</details>\n\n" >> output.log cargo run --release post-merge-report ${PARENT_COMMIT} ${SHA} >> output.log ``` I think that it's better to leave the notice in CI, to avoid generating it in citool, which can also be executed locally. r? `@marcoieni`
2025-03-19Rollup merge of #138655 - Kobzol:rdg-sync, r=jieyouxuMatthias Krüger-32/+56
rustc-dev-guide sync r? `@jieyouxu`
2025-03-19Rollup merge of #138654 - bjorn3:remove_coretests_regex, r=tgross35Matthias Krüger-46/+11
Remove the regex dependency from coretests It is only used by a single test, yet would take up unnecessary space once stdlib deps get vendored.
2025-03-19Rollup merge of #136177 - hkBst:patch-24, r=ibraheemdevMatthias Krüger-24/+17
clarify BufRead::{fill_buf, consume} docs Fixes #85394
2025-03-19Auto merge of #138690 - jieyouxu:temp-disable-fuchsia, r=Kobzolbors-7/+10
Temporarily disable Fuchsia test job to unblock queue See <https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/fuchsia.20failure/with/506637259> for efforts to fix the test job. This PR temporarily disables the Fuchsia test job to unblock the queue, so that neither the Fuchsia maintainers nor T-infra maintainers should feel pressured to fix the job ASAP. Please feel free to re-enable once the test job is fixed. FYI `@erickt` since you or other Fuchsia maintainers will need to revert this change to merge Fuchsia test job fixes in the future. r? infra-ci
2025-03-19Temporarily disable Fuchsia test job to unblock queueJieyou Xu-7/+10
See <https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/fuchsia.20failure/with/506637259> for efforts to fix the test job.
2025-03-19use thenbendn-5/+1
2025-03-18Remove existing AFIDT implementationMichael Goulet-301/+177
2025-03-18Create a safe wrapper around `LLVMRustDIBuilderCreateMemberType`Oli Scherer-42/+60
2025-03-18Avoid splitting up a layoutOli Scherer-22/+24
2025-03-18Revert "Rollup merge of #136355 - ↵Ralf Jung-253/+15
GuillaumeGomez:proc-macro_add_value_retrieval_methods, r=Amanieu" This reverts commit 08dfbf49e30d917c89e49eb14cb3f1e8b8a1c9ef, reversing changes made to 10bcdad7df0de3cfb95c7bdb7b16908e73cafc09.
2025-03-18coverage: Don't store a body span in `FunctionCoverageInfo`Zalathar-19/+14
2025-03-18coverage: Don't refer to the body span when enlarging empty spansZalathar-26/+9
Given that we now only enlarge empty spans to "{" or "}", there shouldn't be any danger of enlarging beyond a function body.
2025-03-18CI: mirror alpine and centos images to ghcrMarcoIeni-0/+7
2025-03-18Apply suggestions from code reviewMarijn Schouten-7/+7
Co-authored-by: Ibraheem Ahmed <ibraheem@ibraheem.ca>
2025-03-18Remove the regex dependency from coretestsbjorn3-46/+11
It is only used by a single test, yet would take up unnecessary space once stdlib deps get vendored.
2025-03-18Remove double nesting in post-merge workflowJakub Beránek-12/+4
2025-03-18Rollup merge of #138644 - mu001999-contrib:add-cfg, r=nnethercoteMatthias Krüger-0/+3
Add `#[cfg(test)]` for Transition in dfa in `rustc_transmute` `Transition` is only used in the `Transitions::insert` in test after #137776 Detected by #128637
2025-03-18Rollup merge of #138642 - jieyouxu:unvac, r=jieyouxuMatthias Krüger-1/+0
Unvacation myself Feeling better now. r? ghost
2025-03-18Rollup merge of #138635 - Zalathar:immediate-subpat, r=compiler-errorsMatthias Krüger-46/+36
Extract `for_each_immediate_subpat` from THIR pattern visitors This is extracted from some larger changes I've been working on, trying to introduce a “THIR pattern id” to refer to THIR pattern nodes without a direct reference. The future of those changes is somewhat uncertain, due to some [proposed changes involving upvar inference](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/upvar.20inference.20on.20THIR.3F). So I'm taking my preparatory changes that make sense on their own, and extracting them into one or more independent PRs. --- This particular patch takes two different functions that were both matching on `PatKind` to traverse subpatterns, and extracts the core match into a single helper function.
2025-03-18Rollup merge of #138569 - aDotInTheVoid:reprdoc-json, r=GuillaumeGomezMatthias Krüger-0/+163
rustdoc-json: Add tests for `#[repr(...)]` Works towards #137645 and #81359 Based on #138018, but with only the test changes. CC ```@obi1kenobi``` r? ```@GuillaumeGomez```
2025-03-18Rollup merge of #138301 - thaliaarchi:io-optional-methods/hermit, r=tgross35Matthias Krüger-6/+18
Implement `read_buf` for Hermit Following https://github.com/hermit-os/kernel/pull/1606, it is now safe to implement `Read::read_buf` for file descriptors on Hermit. cc ```@mkroening```
2025-03-18Rollup merge of #138080 - moxian:bootstrap-breadcrumb, r=jieyouxuMatthias Krüger-2/+3
Leave a breadcrumb towards bootstrap config documentation in `bootstrap.toml` I was curious as to the possible bootstrap options I can put in config.toml, but had some trouble figuring it out. There is no obvious documentation in `config.toml` (obviously), the documentation in src/bootstrap/defaults is *nice*, but also rather sparse, by design. I had to dive into the parsing code, and stuble upon [a very helpful doc comment](https://github.com/rust-lang/rust/blob/30f168ef811aec63124eac677e14699baa9395bd/src/bootstrap/src/core/config/config.rs#L181) there to realize that `config.example.toml` *exists*, and that it does, indeed, answer all of my questions. So I figured it might be worth making this journey a bit easier for future contributors and add mention the `config.example.toml` directly in `config.toml`. Now, since #137081 is in-flight which would rename `config(.example)?.toml` to `bootstrap(.example)?.toml`, I figure it's better to wait until that one lands, and submit the "new", "correct" filename upfront, instead of landing `config.toml` now and updating it to `boostrap.toml` later. `@rustbot` blocked #137081
2025-03-18Rollup merge of #136320 - RalfJung:exit, r=the8472Matthias Krüger-4/+31
exit: document interaction with C Cc https://github.com/rust-lang/rust/issues/126600
2025-03-18Auto merge of #135368 - Ayush1325:uefi-fs-2, r=jhpratt,nicholasbishopbors-5/+138
uefi: fs: Implement exists Also adds the initial file abstractions. The file opening algorithm is inspired from UEFI shell. It starts by classifying if the Path is Shell mapping, text representation of device path protocol, or a relative path and converts into an absolute text representation of device path protocol. After that, it queries all handles supporting EFI_SIMPLE_FILE_SYSTEM_PROTOCOL and opens the volume that matches the device path protocol prefix (similar to Windows drive). After that, it opens the file in the volume using the remaining pat. It also introduces OwnedDevicePath and BorrowedDevicePath abstractions to allow working with the base UEFI and Shell device paths efficiently. DevicePath in UEFI behaves like an a group of nodes laied out in the memory contiguously and thus can be modeled using iterators. This is an effort to break the original PR (https://github.com/rust-lang/rust/pull/129700) into much smaller chunks for faster upstreaming.
2025-03-18Add `#[cfg(test)]` for Transition in dfamu001999-0/+3
2025-03-18Merge pull request #2293 from jieyouxu/rustc-pullJakub Beránek-5330/+8663
Rustc pull
2025-03-18Auto merge of #138630 - matthiaskrgr:rollup-kk1gogr, r=matthiaskrgrbors-1152/+1347
Rollup of 7 pull requests Successful merges: - #138384 (Move `hir::Item::ident` into `hir::ItemKind`.) - #138508 (Clarify "owned data" in E0515.md) - #138531 (Store test diffs in job summaries and improve analysis formatting) - #138533 (Only use `DIST_TRY_BUILD` for try jobs that were not selected explicitly) - #138556 (Fix ICE: attempted to remap an already remapped filename) - #138608 (rustc_target: Add target feature constraints for LoongArch) - #138619 (Flatten `if`s in `rustc_codegen_ssa`) r? `@ghost` `@rustbot` modify labels: rollup
2025-03-18Unvacation myselfJieyou Xu-1/+0
2025-03-18Extract `for_each_immediate_subpat` from THIR pattern visitorsZalathar-46/+36
2025-03-18Merge from rustcJieyou Xu-5329/+8662
2025-03-18Preparing for merge from rustcJieyou Xu-1/+1
2025-03-18uefi: fs: Implement existsAyush Singh-5/+138
Also adds the initial file abstractions. The file opening algorithm is inspired from UEFI shell. It starts by classifying if the Path is Shell mapping, text representation of device path protocol, or a relative path and converts into an absolute text representation of device path protocol. After that, it queries all handles supporting EFI_SIMPLE_FILE_SYSTEM_PROTOCOL and opens the volume that matches the device path protocol prefix (similar to Windows drive). After that, it opens the file in the volume using the remaining pat. It also introduces OwnedDevicePath and BorrowedDevicePath abstractions to allow working with the base UEFI and Shell device paths efficiently. DevicePath in UEFI behaves like an a group of nodes laied out in the memory contiguously and thus can be modeled using iterators. Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2025-03-17Implement read_buf for HermitThalia Archibald-6/+18
2025-03-17Auto merge of #127173 - bjorn3:mangle_rustc_std_internal_symbol, ↵bors-76/+342
r=wesleywiser,jieyouxu Mangle rustc_std_internal_symbols functions This reduces the risk of issues when using a staticlib or rust dylib compiled with a different rustc version in a rust program. Currently this will either (in the case of staticlib) cause a linker error due to duplicate symbol definitions, or (in the case of rust dylibs) cause rustc_std_internal_symbols functions to be silently overridden. As rust gets more commonly used inside the implementation of libraries consumed with a C interface (like Spidermonkey, Ruby YJIT (curently has to do partial linking of all rust code to hide all symbols not part of the C api), the Rusticl OpenCL implementation in mesa) this is becoming much more of an issue. With this PR the only symbols remaining with an unmangled name are rust_eh_personality (LLVM doesn't allow renaming it) and `__rust_no_alloc_shim_is_unstable`. Helps mitigate https://github.com/rust-lang/rust/issues/104707 try-job: aarch64-gnu-debug try-job: aarch64-apple try-job: x86_64-apple-1 try-job: x86_64-mingw-1 try-job: i686-mingw-1 try-job: x86_64-msvc-1 try-job: i686-msvc-1 try-job: test-various try-job: armhf-gnu
2025-03-17Rollup merge of #138619 - yotamofek:pr/codegen_ssa/flatten-ifs, r=lcnrMatthias Krüger-99/+82
Flatten `if`s in `rustc_codegen_ssa` Best viewed [while ignoring whitespace](https://github.com/rust-lang/rust/pull/138619/files?diff=unified&w=1)
2025-03-17Rollup merge of #138608 - heiher:issue-116344, r=RalfJungMatthias Krüger-0/+22
rustc_target: Add target feature constraints for LoongArch Part of https://github.com/rust-lang/rust/issues/116344 r? `@RalfJung`
2025-03-17Rollup merge of #138556 - charmitro:already-remapped-filename, ↵Matthias Krüger-2/+11
r=GuillaumeGomez,Urgau Fix ICE: attempted to remap an already remapped filename This commit fixes an internal compiler error (ICE) that occurs when rustdoc attempts to process macros with a remapped filename. The issue arose during macro expansion when the `--remap-path-prefix` option was used. Instead of passing remapped filenames through, which would trigger the "attempted to remap an already remapped filename" panic, we now extract the original local path from remapped filenames before processing them. A test case has been added to verify this behavior. Fixes #138520
2025-03-17Rollup merge of #138533 - Kobzol:try-job-auto-tests, r=marcoieniMatthias Krüger-19/+26
Only use `DIST_TRY_BUILD` for try jobs that were not selected explicitly Some CI jobs (x64 Linux, ARM64 Linux and x64 MSVC) use the `opt-dist` tool to build an optimized toolchain using PGO and BOLT. When performing a default try build for x64 Linux, in most cases we want to run perf. on that artifact. To reduce the latency of this common use-case, `opt-dist` skips building several components not needed for perf., and it also skips running post-optimization tests, when it detects that the job is executed as a try job (not a merge/auto job). This is useful, but it also means that if you *want* to run the tests, you had to go to `jobs.yml` and manually comment this environment variable, create a WIP commit, do a try build, and then remove the WIP commit, which is annoying (in the similar way that modifying what gets run in try builds was annoying before we had the `try-job` annotations). I thought that we could introduce some additional PR description marker like `try-job-run-tests`, but it's hard to discover that such things exist. Instead, I think that there's a much simpler heuristic for determining whether `DIST_TRY_BUILD` should be used (that I implemented in this PR): - If you do just ``@bors` try`, without any custom try jobs selected, `DIST_TRY_BUILD` will be activated, to finish the build as fast as possible. - If you specify any custom try jobs, you are most likely doing experiments and you want to see if tests pass and everything builds as it should. The `DIST_TRY_BUILD` variable will thus *not* be set in this case. In this way, if you want to run dist tests, you can just add the `try-job: dist-x86_64-linux` line to the PR description, and you don't need to create any WIP commits. r? `@marcoieni`