about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-07-31Merge ref '32e7a4b92b10' from rust-lang/rustThe rustc-josh-sync Cronjob Bot-14887/+25302
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: 32e7a4b92b109c24e9822c862a7c74436b50e564 Filtered ref: 56d8aa13f54944edb711f3bdd7013b082dbaa65b This merge was created using https://github.com/rust-lang/josh-sync.
2025-07-31Prepare for merging from rust-lang/rustThe rustc-josh-sync Cronjob Bot-1/+1
This updates the rust-version file to 32e7a4b92b109c24e9822c862a7c74436b50e564.
2025-07-31Merge ref '32e7a4b92b10' from rust-lang/rustThe rustc-josh-sync Cronjob Bot-7983/+13828
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: 32e7a4b92b109c24e9822c862a7c74436b50e564 Filtered ref: d39f3479bfafb04026ed3afec68aa671d13e9c3c This merge was created using https://github.com/rust-lang/josh-sync.
2025-07-31Prepare for merging from rust-lang/rustThe rustc-josh-sync Cronjob Bot-1/+1
This updates the rust-version file to 32e7a4b92b109c24e9822c862a7c74436b50e564.
2025-07-31Consider operator's span when computing binop expr spanMichael Goulet-17/+20
2025-07-31Move `ParamTerm` out of `rustc_middle`.Nicholas Nethercote-20/+20
It's only used in `rustc_hir_typeck`.
2025-07-31Move an `EarlyParamRegion` impl block.Nicholas Nethercote-9/+9
Next to all the other `EarlyParamRegion` pieces.
2025-07-31Move `ImplHeader` out of `rustc_middle`.Nicholas Nethercote-18/+19
It's not used in `rustc_middle`, and `rustc_trait_selection` is a better place for it.
2025-07-31Move `ResolverOutputs` out of `rustc_middle`.Nicholas Nethercote-9/+9
It's not used in `rustc_middle`, and `rustc_resolve` is a better place for it.
2025-07-31Remove unused `impl_decodable_via_ref!` entries.Nicholas Nethercote-3/+0
2025-07-31Auto merge of #144405 - lcnr:hir-typeck-uniquify, r=BoxyUwUbors-57/+353
uniquify root goals during HIR typeck We need to rely on region identity to deal with hangs such as https://github.com/rust-lang/trait-system-refactor-initiative/issues/210 and to keep the current behavior of `fn try_merge_responses`. This is a problem as borrowck starts by replacing each *occurrence* of a region with a unique inference variable. This frequently splits a single region during HIR typeck into multiple distinct regions. As we assume goals to always succeed during borrowck, relying on two occurances of a region being identical during HIR typeck causes ICE. See the now fixed examples in https://github.com/rust-lang/trait-system-refactor-initiative/issues/27 and rust-lang/rust#139409. We've previously tried to avoid this issue by always *uniquifying* regions when canonicalizing goals. This prevents caching subtrees during canonicalization which resulted in hangs for very large types. People rely on such types in practice, which caused us to revert our attempt to reinstate `#[type_length_limit]` in https://github.com/rust-lang/rust/pull/127670. The complete list of changes here: - rust-lang/rust#107981 - rust-lang/rust#110180 - rust-lang/rust#114117 - rust-lang/rust#130821 After more consideration, all occurrences of such large types need to happen outside of typeck/borrowck. We know this as we already walk over all types in the MIR body when replacing their regions with nll vars. This PR therefore enables us to rely on region identity inside of the trait solver by exclusively **uniquifying root goals during HIR typeck**. These are the only goals we assume to hold during borrowck. This is insufficient as type inference variables may "hide" regions we later uniquify. Because of this, we now stash proven goals which depend on inference variables in HIR typeck and reprove them after writeback. This closes https://github.com/rust-lang/trait-system-refactor-initiative/issues/127. This was originally part of rust-lang/rust#144258 but I've moved it into a separate PR. While I believe we need to rely on region identity to fix the performance issues in some way, I don't know whether rust-lang/rust#144258 is the best approach to actually do so. Regardless of how we deal with the hangs however, this change is necessary and desirable regardless. r? `@compiler-errors` or `@BoxyUwU`
2025-07-31Use specific name for "frame" span fieldStypox-1/+1
Otherwise the field would be named "message" by default
2025-07-31Use new enter_trace_span! syntax for layout_of & friendsStypox-3/+3
2025-07-31Uniform enter_trace_span! and add documentationStypox-20/+65
The macro was uniformed between rustc_const_eval and miri
2025-07-30test: Check close window renderingScott Schafer-0/+43
2025-07-30Auto merge of #116316 - cjgillot:incr-privacy, r=petrochenkovbors-1/+0
Remove eval_always from check_private_in_public. This PR attempts to avoid re-computing `check_private_in_public` query. First by marking the query as non-`eval_always`, and by reducing the amount of accesses to HIR as much as possible. Latest perf https://github.com/rust-lang/rust/pull/116316#issuecomment-3094672105 shows that we manage it. The cost is extra dep-graph bookkeeping.
2025-07-30Address some rustc inconsistency issuesHaowei Wu-5/+13
We noticed when building rustc multiple time in a roll, some files will not be consistent across the build despite the fact that they are built from same source under the same environment. This patch addresses the inconsistency issue we found on libunwind.a by sorting the order of the files passed to the linker.
2025-07-30expand WF obligations when checking method callsMichael Goulet-35/+30
2025-07-30[test][AIX] ignore extern_weak linkage testDavid Tenty-0/+1
The AIX linkage model doesn't support ELF style extern_weak semantic, so just skip this test, like other platforms that don't have it.
2025-07-30stall ConstArgHasType in compute_goal_fast_pathMichael Goulet-0/+7
2025-07-30rustdoc-json: Move `#[macro_export]` from `Other` to it's own variantAlona Enraght-Moony-6/+13
2025-07-30rustdoc-json: Add test for `#[macro_use]` attributeAlona Enraght-Moony-0/+40
2025-07-30Stabilize strict_overflow_opsNurzhan Sakén-89/+56
2025-07-30Auto merge of #144692 - samueltardieu:rollup-0j1y08x, r=samueltardieubors-378/+665
Rollup of 4 pull requests Successful merges: - rust-lang/rust#143465 (Support multiple crate versions in --extern-html-root-url) - rust-lang/rust#144308 ([rustdoc] Display total time and compilation time of merged doctests) - rust-lang/rust#144655 (clean up codegen fn attrs) - rust-lang/rust#144675 (Reject running `compiletest` self-tests against stage 0 rustc unless explicitly allowed) r? `@ghost` `@rustbot` modify labels: rollup
2025-07-30Simplify boolean expression in `manual_assert`Samuel Tardieu-15/+9
2025-07-30Rollup merge of #144675 - jieyouxu:compiletest-staging, r=KobzolSamuel Tardieu-14/+56
Reject running `compiletest` self-tests against stage 0 rustc unless explicitly allowed Currently, in `pr-check-1`, we run `python3 ../x.py test --stage 0 src/tools/compiletest`, which is `compiletest` self-tests against stage 0 rustc. This makes it very annoying for PRs wanting to change target spec JSON format, which `compiletest` depends on for target information, as otherwise `compiletest` would have to know how to handle 2 different target spec JSON formats and know when to pick which. Instead of doing that, we change `compiletest` self-tests to reject running against stage 0 `rustc` *unless* explicitly allowed with `build.compiletest-allow-stage0=true`. `build.compiletest-allow-stage0` is a proper bootstrap config option in favor of the ad-hoc `COMPILETEST_FORCE_STAGE0` env var. This means that: - `./x test src/tools/compiletest --stage=0` is not allowed, unless `build.compiletest-allow-stage0=true` is set. In this scenario, `compiletest` self-tests should be expected to fail unless the stage 0 `rustc` as provided is like codegen_cranelift where it's *actually* built from in-tree `rustc` sources. - In CI, we change `./x test src/tools/compiletest --stage=0` to `./x test src/tools/compiletest --stage=1`, and move it to `pr-check-2`. Yes, this involves building the stage 1 compiler, but `pr-check-2` already has to build stage 1 compiler to test stage 1 library crates. - Crucially, this means that **`compiletest` is only intended to support one target spec JSON format**, namely the one corresponding to the in-tree `rustc`. - This should preserve the `compiletest-use-stage0-libtest` UX optimization where changing `compiler/` tree should still not require rebuilding `compiletest` as long as `build.compiletest-use-stage0-libtest=true`, as that should remain orthogonal. This is completely unlike my previous attempt at https://github.com/rust-lang/rust/pull/144563 that tries to do a way more invasive change which would cause the rebuild problem. Best reviewed commit-by-commit. --- r? `@Kobzol`
2025-07-30Rollup merge of #144655 - jdonszelmann:cleanup-codegen-fn-attrs, r=WaffleLapkinSamuel Tardieu-237/+289
clean up codegen fn attrs This honestly had become a mess over time and needed some love. No behavior should've changed, and I effectively just moved code around. Though, I can't promise there weren't any bugs in the original code with how randomly it was organised..... r? `@WaffleLapkin`
2025-07-30Rollup merge of #144308 - GuillaumeGomez:merged-doctest-times, r=lolbinarycatSamuel Tardieu-114/+212
[rustdoc] Display total time and compilation time of merged doctests Fixes rust-lang/rust#144270. Does it look good to you `@kpreid?` <img width="908" height="263" alt="image" src="https://github.com/user-attachments/assets/cd5d082d-c4e0-42ed-91dd-bd263b413dcd" />
2025-07-30Rollup merge of #143465 - kornelski:extern-name, r=petrochenkovSamuel Tardieu-13/+108
Support multiple crate versions in --extern-html-root-url Rustdoc's `--extern-html-root-url` used to use `tcx.crate_name()` to identify crates, but that used crates' internal names from their metadata, instead of names given to them in `--extern`. That was confusing, because both `--extern…` arguments seem related and use similar syntax. Crucially, this didn't work correctly with Cargo's package aliases or multiple versions of crates. `sess.opts.externs` lacks `CrateNum`, and `Resolver.extern_prelude` gets destroyed before `rustdoc` has a chance to see it, so I've had to save this mapping in `CStore`. Just in case, I've kept the previous mapping by crate name as a fallback for crates that weren't matched by their extern name. Fixes rust-lang/rust#76296
2025-07-30Distinguish appending and replacing self ty in predicatesMichael Goulet-1/+1
2025-07-30Distinguish appending and replacing self ty in predicatesMichael Goulet-42/+53
2025-07-30Optimize some usages of `!!` and `--` in suggestions (#15366)Jason Newcomb-40/+101
When an expression is made of a `!` or `-` unary operator which does not change the type of the expression, use a new variant in `Sugg` to denote it. This allows replacing an extra application of the same operator by the removal of the original operator instead. Some suggestions will now be shown as `x` instead of `!!x`. Right now, no suggestion seems to produce `--x`. changelog: none
2025-07-30Implement push_mutBalt-29/+243
2025-07-30Fix `iter_on_single_items` FP on function pointers and let stmts (#15013)Alejandra González-34/+85
Closes rust-lang/rust-clippy#14981 changelog: [`iter_on_single_items`] fix FP on function pointers and let stmts
2025-07-30Simplify the configuration for no-panicTrevor Gross-174/+174
Currently, attributes for `no-panic` are gated behind both the `test` config and `assert_no_panic`, because `no-panic` is a dev dependency (so only available with test configuration). However, we only emit `assert_no_panic` when the test config is also set anyway, so there isn't any need to gate on both. Replace gates on `all(test, assert_no_panic)` with only `assert_no_panic`. This is simpler, and also has the benefit that attempting to check for panics without `--test` errors.
2025-07-30ci: Set pipefail before running ci-utilTrevor Gross-1/+3
Currently, a failure in `ci-util.py` does not cause the job to fail because the pipe eats the failure status . Set pipefail to fix this. Fixes: ff2cc0e38e3e ("ci: Don't print output twice in `ci-util`")
2025-07-30Merge pull request #745 from GuillaumeGomez/regenantoyo-0/+60
Regenerate intrinsics mapping
2025-07-30add `SyntaxEditor::delete_all` to migrate utils.rs ↵Hmikihiro-26/+67
`add_trait_assoc_items_to_impl`
2025-07-30only extract lang items onceJana Dönszelmann-5/+3
2025-07-30clean up codegen fn attrsJana Dönszelmann-237/+289
2025-07-30Abtract away json protocol for proc-macro-srvLukas Wirth-260/+472
2025-07-30Regenerate intrinsics mappingGuillaume Gomez-0/+60
2025-07-30extend commentlcnr-0/+13
2025-07-30add comment and opaque type fixmelcnr-0/+11
2025-07-30handle region dependent goals due to infer varslcnr-19/+128
2025-07-30Add change tracker entryJieyou Xu-0/+5
2025-07-30Run `compiletest` self-tests against stage 1 rustcJieyou Xu-2/+2
And move `./x test compiletest --stage=1` to `pr-check-2`, where testing library artifacts already requires building the stage 1 compiler.
2025-07-30Deny `compiletest` self-tests being run against stage 0 rustc unless ↵Jieyou Xu-1/+18
explicitly allowed Otherwise, `compiletest` would have to know e.g. how to parse two different target spec, if target spec format was changed between beta `rustc` and in-tree `rustc`.
2025-07-30Update `codegen_{cranelift,gcc}` and `opt-dist` to use ↵Jieyou Xu-3/+4
`build.compiletest-allow-stage0`
2025-07-30Update `codegen_{cranelift,gcc}` and `opt-dist` to use ↵Jieyou Xu-5/+7
`build.compiletest-allow-stage0`