about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-08-05we only merge candidates for trait and normalizes-to goalslcnr-69/+48
2025-08-05Auto merge of #144934 - samueltardieu:rollup-25jvb9g, r=samueltardieubors-6297/+7517
Rollup of 17 pull requests Successful merges: - rust-lang/rust#144467 (rustdoc template font links only emit `crossorigin` when needed) - rust-lang/rust#144548 (Rehome 21 `tests/ui/issues/` tests to other subdirectories under `tests/ui/`) - rust-lang/rust#144741 (fix: Error on illegal `[const]`s inside blocks within legal positions) - rust-lang/rust#144776 (`Printer` cleanups) - rust-lang/rust#144779 (Implement debugging output of the bootstrap Step graph into a DOT file) - rust-lang/rust#144813 (Add a tidy check to prevent adding UI tests directly under `tests/ui/`) - rust-lang/rust#144817 (Properly reject tail calls to `&FnPtr` or `&FnDef`) - rust-lang/rust#144852 (Rename `rust_panic_without_hook` to `resume_unwind` ) - rust-lang/rust#144866 (Remove `SHOULD_EMIT_LINTS` in favor of `should_emit`) - rust-lang/rust#144867 (Use `as_array` in PartialEq for arrays) - rust-lang/rust#144872 (Document Poisoning in `LazyCell` and `LazyLock`) - rust-lang/rust#144877 (coverage: Various small cleanups) - rust-lang/rust#144887 (`rust-analyzer` subtree update) - rust-lang/rust#144890 (Add `InterpCx::project_fields`) - rust-lang/rust#144894 (Delete `tests/ui/threads-sendsync/tcp-stress.rs`) - rust-lang/rust#144905 (rustc-dev-guide subtree update) - rust-lang/rust#144920 (Dont print arg span in MIR dump for tail call) r? `@ghost` `@rustbot` modify labels: rollup
2025-08-05Rollup merge of #144920 - compiler-errors:span-arg, r=lqdSamuel Tardieu-8/+8
Dont print arg span in MIR dump for tail call r? WaffleLapkin This makes the MIR dump for tail call terminators consistent w/ regular calls.
2025-08-05Rollup merge of #144905 - tshepang:rdg-sync, r=jieyouxuSamuel Tardieu-156/+205
rustc-dev-guide subtree update Subtree update of `rustc-dev-guide` to https://github.com/rust-lang/rustc-dev-guide/commit/1263fc23672325c1d2e3d6bba8a7dd89e986245c. Created using https://github.com/rust-lang/josh-sync. r? ``@ghost``
2025-08-05Rollup merge of #144894 - jieyouxu:chop-thread-cnt, r=ChrisDentonSamuel Tardieu-64/+0
Delete `tests/ui/threads-sendsync/tcp-stress.rs` This stress test was originally introduced in 65cca4bd3fa0abe1000662014b3e3ea1420728f5 to detect a UAF in `libuv` (see rust-lang/rust#12823), but we no longer use `libuv`, so remove this test as it no longer serves its original purpose, and is causing flaky timeout failures. Closes rust-lang/rust#144878 (by removing the test). r? libs
2025-08-05Rollup merge of #144890 - WaffleLapkin:project_fields, r=lcnrSamuel Tardieu-33/+44
Add `InterpCx::project_fields` I was hoping for a much bigger improvement and this is lukewarm at best ^^' Still, I think this makes sense.
2025-08-05Rollup merge of #144887 - lnicola:sync-from-ra, r=lnicolaSamuel Tardieu-4814/+5513
`rust-analyzer` subtree update Subtree update of `rust-analyzer` to https://github.com/rust-lang/rust-analyzer/commit/8d75311400a108d7ffe17dc9c38182c566952e6e. Created using https://github.com/rust-lang/josh-sync. r? `@ghost`
2025-08-05Rollup merge of #144877 - Zalathar:coverage-various, r=lcnrSamuel Tardieu-271/+77
coverage: Various small cleanups This PR is a collection of small coverage-related changes that I accumulated while working towards other coverage improvements. Each change should hopefully be fairly straightforward.
2025-08-05Rollup merge of #144872 - connortsui20:once-poison-docs, r=AmanieuSamuel Tardieu-5/+118
Document Poisoning in `LazyCell` and `LazyLock` Currently, there is no documentation of poisoning behavior in either `LazyCell` or `LazyLock`, even though both of them can be observed as poisoned by users. `LazyCell` [plagyround example](https://play.rust-lang.org/?version=stable&mode=debug&edition=2024&gist=9cf38b8dc56db100848f54085c2c697d) `LazyLock` [playground example](https://play.rust-lang.org/?version=stable&mode=debug&edition=2024&gist=f1cd6f9fe16636e347ebb695a0ce30c0) # Open Questions - [x] Is it worth making the implementation of `LazyLock` more complicated to ensure that the the panic message is `"LazyLock instance has previously been poisoned"` instead of `"Once instance has previously been poisoned"`? See the `LazyLock` playground link above for more context. - [x] Does it make sense to move `LazyLock` into the `poison` module? It is certainly a poison-able type, but at the same time it is slightly different from the 4 other types currently in the `poison` module in that it is unrecoverable. I think this is more of a libs-api question. ``@rustbot`` label +T-libs-api Please let me know if these open questions deserve a separate issue / PR!
2025-08-05Rollup merge of #144867 - scottmcm:more-as-array, r=chenyukangSamuel Tardieu-16/+12
Use `as_array` in PartialEq for arrays Now that `as_array` exists we might as well use it here, since it's a bit more convenient than getting the correct type out of `try_into`.
2025-08-05Rollup merge of #144866 - JonathanBrouwer:should_emit_fix, r=jdonszelmannSamuel Tardieu-4/+11
Remove `SHOULD_EMIT_LINTS` in favor of `should_emit` r? ``@jdonszelmann``
2025-08-05Rollup merge of #144852 - Kivooeo:rename-panic, r=m-ou-seSamuel Tardieu-2/+2
Rename `rust_panic_without_hook` to `resume_unwind` part of https://github.com/rust-lang/rust/issues/116005 r? libs
2025-08-05Rollup merge of #144817 - WaffleLapkin:reject-referety, r=UrgauSamuel Tardieu-3/+195
Properly reject tail calls to `&FnPtr` or `&FnDef` Fixes rust-lang/rust#144795
2025-08-05Rollup merge of #144813 - jieyouxu:no-top-level-tests, r=KobzolSamuel Tardieu-105/+173
Add a tidy check to prevent adding UI tests directly under `tests/ui/` This PR implements https://github.com/rust-lang/compiler-team/issues/902. Only the last commit (adding the new check) is functional; earlier commits are just small drive-by changes to make the other ui/ui-fulldeps checks more logically contained. r? ```@Kobzol``` (or compiler)
2025-08-05Rollup merge of #144779 - Kobzol:bootstrap-dot, r=jieyouxuSamuel Tardieu-2/+229
Implement debugging output of the bootstrap Step graph into a DOT file There are already a bunch of ways how we can debug bootstrap, so why not add one more =D (ideally I'd like to consolidate these approaches somewhat, ```@Shourya742``` is looking into that, but I think that this specific debugging tool is orthogonal to the rest of them, and is quite useful). This PR adds the option to render the bootstrap step graph into the DOT format, in order to understand what steps were executed, along with their fields (`Debug` output). Here you can see an example of the generated DOT files for the `BOOTSTRAP_TRACING=1 ./x build compiler --stage 2 --dry-run` command on x64 Linux. One is with cached deps (what this PR does), the other one without. [bootstrap-dot.zip](https://github.com/user-attachments/files/21548679/bootstrap-dot.zip) Visual example: <img width="1899" height="445" alt="image" src="https://github.com/user-attachments/assets/ae40e6d2-0ea8-48bb-b77e-6b21700b95ee" /> r? ```@jieyouxu```
2025-08-05Rollup merge of #144776 - nnethercote:Printer-cleanups, r=cjgillotSamuel Tardieu-693/+649
`Printer` cleanups The trait `Printer` is implemented by six types, and the sub-trait `PrettyPrinter` is implemented by three of those types. The traits and the impls are complex and a bit of a mess. This PR starts to clean them up. r? ``@davidtwco``
2025-08-05Rollup merge of #144741 - ShoyuVanilla:tilde-const-in-block, r=fee1-deadSamuel Tardieu-42/+140
fix: Error on illegal `[const]`s inside blocks within legal positions Fixes rust-lang/rust#132067 I initially considered moving `[const]` validations to `rustc_ast_lowering`, but that approach would require adding constness information to `AssocCtxt`, which introduces significant changes - especially within `rustc_expand` - just to support a single use case here: https://github.com/rust-lang/rust/blob/3fb1b53a9dbfcdf37a4b67d35cde373316829930/compiler/rustc_ast_passes/src/ast_validation.rs#L1596-L1610 Instead, I believe it's sufficient to simply "reset" `[const]` allowness whenever we enter a new block.
2025-08-05Rollup merge of #144548 - Oneirical:uncountable-integer-2, r=jieyouxuSamuel Tardieu-78/+87
Rehome 21 `tests/ui/issues/` tests to other subdirectories under `tests/ui/` rust-lang/rust#143902 divided into smaller, easier to review chunks. Part of rust-lang/rust#133895 Methodology: 1. Refer to the previously written `tests/ui/SUMMARY.md` 2. Find an appropriate category for the test, using the original issue thread and the test contents. 3. Add the issue URL at the bottom (not at the top, as that would mess up stderr line numbers) 4. Rename the tests to make their purpose clearer Inspired by the methodology that ``@Kivooeo`` was using. r? ``@jieyouxu``
2025-08-05Rollup merge of #144467 - hydro-project:users/mingwes/rustdoc-fix-cors, ↵Samuel Tardieu-1/+54
r=GuillaumeGomez rustdoc template font links only emit `crossorigin` when needed The `crossorigin` attribute may cause issues when the href is not actually cross-origin. Specifically, the tag causes the browser to send a preflight OPTIONS request to the server even if it is same-origin. Some temperamental servers may reject all CORS preflight requests even if they're actually same-origin, which causes a CORS error and prevents the fonts from loading, even later on. This commit fixes that problem by not emitting `crossorigin` if the url appears to be relative to the same origin.
2025-08-04Dont print arg span in MIR dump for tail callMichael Goulet-8/+8
2025-08-04Auto merge of #144893 - GuillaumeGomez:subtree-update_cg_gcc_2025-08-04, ↵bors-45/+275
r=GuillaumeGomez GCC backend subtree update cc `@antoyo`
2025-08-04Merge pull request #2533 from rust-lang/rustc-pullTshepang Mbambo-3811/+6067
Rustc pull update
2025-08-04Remove `tcp-stress.rs` testJieyou Xu-64/+0
This stress test was originally introduced in 65cca4bd3fa0abe1000662014b3e3ea1420728f5 to detect a UAF in libuv (see RUST-12823), but we no longer use libuv, so remove this test as it was causing flaky timeout failures. See RUST-144878 for discussion.
2025-08-04add `project_fields` helper functionWaffle Lapkin-13/+22
2025-08-04Merge commit '482e8540a1b757ed7bccc2041c5400f051fdb01e' into ↵Guillaume Gomez-45/+275
subtree-update_cg_gcc_2025-08-04
2025-08-04small refactor of `InterpResult`Waffle Lapkin-20/+22
- don't need type alias to default type argument - `Residual` impl allows to use more std APIs (like `<[T; N]>::try_map`)
2025-08-04properly reject tail calls to `&FnPtr` or `&FnDef`Waffle Lapkin-2/+194
2025-08-04drive-by cleanup: fix outdated documentationWaffle Lapkin-1/+1
2025-08-04Do not render both cached and uncached edge between two stepsJakub Beránek-1/+7
2025-08-04Implement debugging output of the bootstrap Step graph into a DOT fileJakub Beránek-2/+223
2025-08-04Auto merge of #144882 - Zalathar:rollup-i5q32em, r=Zalatharbors-42/+456
Rollup of 2 pull requests Successful merges: - rust-lang/rust#144694 (Distinguish prepending and replacing self ty in predicates) - rust-lang/rust#144875 (Add some pre-codegen MIR tests for debug mode) r? `@ghost` `@rustbot` modify labels: rollup
2025-08-04Rollup merge of #144875 - scottmcm:more-mir-tests, r=cjgillotStuart Cook-0/+403
Add some pre-codegen MIR tests for debug mode No functional changes; just some tests. I made these for rust-lang/rust#144483, but that's going in a different direction, so I wanted to propose we just add them to help see the impact of other related changes in the future. r? mir
2025-08-04Rollup merge of #144694 - compiler-errors:with-self-ty, r=SparrowLiiStuart Cook-42/+53
Distinguish prepending and replacing self ty in predicates There are two kinds of functions called `with_self_ty`: 1. Prepends the `Self` type onto an `ExistentialPredicate` which lacks it in its internal representation. 2. Replaces the `Self` type of an existing predicate, either for diagnostics purposes or in the new trait solver when normalizing that self type. This PR distinguishes these two because I often want to only grep for one of them. Namely, let's call it `with_replaced_self_ty` when all we're doing is replacing the self type.
2025-08-04Merge ref '383b9c447b61' from rust-lang/rustThe rustc-josh-sync Cronjob Bot-3810/+6066
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: 383b9c447b61641e1f1a3850253944a897a60827 Filtered ref: 14b7b0bbd1e38402fca29ef84e5f75ee9d8cb1a9 This merge was created using https://github.com/rust-lang/josh-sync.
2025-08-04Prepare for merging from rust-lang/rustThe rustc-josh-sync Cronjob Bot-1/+1
This updates the rust-version file to 383b9c447b61641e1f1a3850253944a897a60827.
2025-08-04coverage: Represent `CovmapVersion` as an enumZalathar-15/+32
Using an enum here was historically not worth the extra hassle, but now we can lean on `#[derive(TryFromU32)]` to hide most of the boilerplate.
2025-08-04coverage: Simplify access to debug/testing `-Zcoverage-options` flagsZalathar-6/+9
2025-08-04coverage: Push async special case down into `extract_refined_covspans`Zalathar-14/+16
2025-08-04coverage: Remove `-Zcoverage-options=no-mir-spans`Zalathar-226/+5
This flag turned out to be less useful than anticipated, and interferes with work towards expansion support.
2025-08-04coverage: Hoist `counter_for_bcb` out of its loopZalathar-10/+10
Having this helper function in the loop was confusing, because it doesn't rely on anything that changes between loop iterations.
2025-08-04coverage: Include an `Instance` in `CovfunRecord` for debug messagesZalathar-1/+6
2025-08-04Auto merge of #144876 - Zalathar:rollup-jhv9rir, r=Zalatharbors-173/+850
Rollup of 12 pull requests Successful merges: - rust-lang/rust#142205 (Mark `slice::swap_with_slice` unstably const) - rust-lang/rust#144188 (`available_parallelism`: Add documentation for why we don't look at `ulimit`) - rust-lang/rust#144322 (Add lint against dangling pointers from local variables) - rust-lang/rust#144497 (tests: Add test for basic line-by-line stepping in a debugger) - rust-lang/rust#144559 (Enable extract-insert-dyn.rs test on RISC-V (riscv64)) - rust-lang/rust#144667 (`AlignmentEnum` should just be `repr(usize)` now) - rust-lang/rust#144706 (Do not give function allocations alignment in consteval and Miri.) - rust-lang/rust#144746 (resolve: Cleanups and micro-optimizations to extern prelude) - rust-lang/rust#144785 (Regression test for LLVM error with unsupported expression in static initializer for const pointer in array on macOS.) - rust-lang/rust#144811 (Stylize `*-lynxos178-*` target maintainer handle to make it easier to copy/paste) - rust-lang/rust#144848 (For "stage 1" ui-fulldeps, use the stage 1 compiler to query target info) - rust-lang/rust#144853 (Remove unnecessary `rust_` prefixes) Failed merges: - rust-lang/rust#144794 (Port `#[coroutine]` to the new attribute system) r? `@ghost` `@rustbot` modify labels: rollup
2025-08-04Rollup merge of #144853 - Kivooeo:rust_-cleanup, r=Mark-SimulacrumStuart Cook-17/+17
Remove unnecessary `rust_` prefixes part of https://github.com/rust-lang/rust/issues/116005 Honestly, not sure if this can affect linking somehow, also I didn't touched things like `__rust_panic_cleanup` and `__rust_start_panic` which very likely will break something, so just small cleanup here also didn't changed `rust_panic_without_hook` because it was renamed here https://github.com/rust-lang/rust/pull/144852 r? libs
2025-08-04Rollup merge of #144848 - Zalathar:ui-fulldeps, r=clubby789Stuart Cook-10/+40
For "stage 1" ui-fulldeps, use the stage 1 compiler to query target info Testing ui-fulldeps in "stage 1" actually uses the stage 0 compiler, so that test programs can link against stage 1 rustc crates. Unfortunately, using the stage 0 compiler causes problems when compiletest tries to obtain target information from the compiler, but the output format has changed since the last bootstrap beta bump. We can work around this by also providing compiletest with a stage 1 compiler, and having it use that compiler to query for target information. --- This fixes the stage 1 ui-fulldeps failure seen at https://github.com/rust-lang/rust/pull/144443#issuecomment-3146992771.
2025-08-04Rollup merge of #144811 - jieyouxu:target-maintainer-docs, r=NoratriebStuart Cook-1/+1
Stylize `*-lynxos178-*` target maintainer handle to make it easier to copy/paste Apparently I forgot to submit this branch I had lying around. Noticed while reviewing Tier 3 target platform support pages. In the same style as rust-lang/rust#139028.
2025-08-04Rollup merge of #144785 - lucarlig:master, r=lqdStuart Cook-0/+18
Regression test for LLVM error with unsupported expression in static initializer for const pointer in array on macOS. Regression test for rust-lang/rust#89225, I have shortened the original example as much as i could, while still generating the error. here is my output on MacOs: ``` rustup run 1.60 cargo build --release Compiling rug_int v0.1.0 (/Users/luca/dev/rug_int) LLVM ERROR: Unsupported expression in static initializer: zext (i64 ptrtoint (<{ [4 x i8] }>* `@anon.fad58de7366495db4650cfefac2fcd61.0` to i64) to i128) error: could not compile `rug_int` rustup run 1.61 cargo build --release Compiling rug_int v0.1.0 (/Users/luca/dev/rug_int) Finished release [optimized] target(s) in 0.60s ```
2025-08-04Rollup merge of #144746 - petrochenkov:extpreltidy, r=b-naberStuart Cook-63/+74
resolve: Cleanups and micro-optimizations to extern prelude This is what can be done without changing the structure of `ExternPreludeEntry`, like in https://github.com/rust-lang/rust/pull/144737. See individual commits for details.
2025-08-04Rollup merge of #144706 - zachs18:fix-144661, r=RalfJungStuart Cook-27/+6
Do not give function allocations alignment in consteval and Miri. We do not yet have a (clear and T-lang approved) design for how `#[align(N)]` on functions should affect function pointers' addresses on various platforms, so for now do not give function pointers alignment in consteval and Miri. ---- Old summary: Not a full solution to <https://github.com/rust-lang/rust/issues/144661>, but fixes the immediate issue by making function allocations all have alignment 1 in consteval, ignoring `#[rustc_align(N)]`, so the compiler doesn't know if any offset other than 0 is non-null. A more "principlied" solution would probably be to make function pointers to `#[instruction_set(arm::t32)]` functions be at offset 1 of an align-`max(2, align attribute)` allocation instead of at offset 0 of their allocation during consteval, and on wasm to either disallow `#[align(N)]` where N > 1, or to pad the function table such that the function pointer of a `#[align(N)]` function is a multiple of `N` at runtime.
2025-08-04Rollup merge of #144667 - scottmcm:alignment-is-usize, r=tgross35Stuart Cook-37/+22
`AlignmentEnum` should just be `repr(usize)` now These used to use specific sizes because they were compiled on all widths. But now that the types themselves are `#[cfg]`'d, we can save some conversions by having it always be `repr(usize)`.
2025-08-04Rollup merge of #144559 - CaiWeiran:extract-insert-dyn_test, r=Mark-SimulacrumStuart Cook-9/+18
Enable extract-insert-dyn.rs test on RISC-V (riscv64) This PR adds support for running the `tests/codegen-llvm/simd/extract-insert-dyn.rs` test on the RISC-V (riscv64) architecture. Previously, this test would fail on RISC-V targets due to architecture-specific code generation issues. This patch modifies the test to ensure compatibility while preserving its intent. The change has been tested locally using `./x test` on a riscv64 target, and the test now passes as expected. ### Notes: - This change is scoped specifically to improve RISC-V compatibility. - It does not affect behavior or test results on other architectures.