Rollup of 8 pull requests#158906
Closed
m-ou-se wants to merge 17 commits into
Closed
Conversation
…stics Point users at `#![feature(generic_const_args)]` and `type const` items when they hit the "generic parameters may not be used in const operations" error, not just `generic_const_exprs`.
Starting with FreeBSD 16.0, powerpc64le switches to IEEE long double. 128 bit arithmetics are implemented in LLVM's compiler_rt, which is FreeBSD's libgcc. Link with it so that building on FreeBSD 16.0 succeeds - noop for earlier releases.
…r generation for memcpy. This moves a TA failure in the testcase from memcpy to a later location.
`body_id` is often used to mean "ID of a body-owning node", which is confusing since the obvious reading of "body ID" is wrong. `body_def_id` is easier to read as "body-owning definition ID".
* Support mapping of all arguments with Self type * Address some review comments * Review: use #[cfg(debug_assertions)] on the whole module * Review: emit error when trying to map non-receiver argument when block contains definitions * Use `cfg_select` * Fix tidy * Unify mapping with `should_generate_block` * Better naming and message for error * loop -> `extend`
…gnostic-156729, r=petrochenkov diagnostics: suggest generic_const_args for const ops fixes rust-lang#156729 when const ops hit generic params, like `[u8; size_of::<self>()]`, the diagnostic only points at `generic_const_exprs`. imo that's a stale nudge now that `generic_const_args` and `type const` items are the path we want people trying. add help for `generic_const_args` and `type const` items in the resolve and hir_ty_lowering paths. also skip the old gce suggestion once `min_generic_const_args` is enabled, and emit both suggestions for the `self` alias path so the "alternatively" wording doesn't hang there by itself. includes the regression test from the issue. lgtm.
allow mGCA const arguments to fall back to anon consts makes good progress on rust-lang/project-const-generics#108 `min_generic_const_args` (mGCA) is all about "is this const lowered to a const item with a body, or, is it "directly" represented and visible in the type system?" Here's various answers to the question of "can we represent this const arg directly?" - if we answer "no", then we fall back to an anon const (or error, sometimes, depending on context) on **stable**, the full list of things can be directly represented is (... it's just the one thing) - paths to generic const parameters on `main`, under mGCA, **before** this PR: - absolutely everything, if something cannot be represented directly, compiler error - `const { }` gives you an escape hatch to go back to being an anon const on macro**ful** gca, the directly represented things will be: - paths to const parameters - `direct_const_arg!` macro on macro**less** gca, the directly represented things will be: - paths to const parameters - `direct_const_arg!` macro (not *particularly* useful under macro**less** gca) - struct expressions, arrays, blah blah - currently, paths to *anything*, even if that produces a compiler error later down the line (potential followup work here...) this PR implements macro**less** gca, with the intent of a quick follow-up introducing a "macroless gca" feature and transitioning `#[feature(min_generic_const_args)]` to be macro**ful** gca Also of note is that this PR removes the logic to skip generating "fake" DefIds for directly represented AnonConsts under mGCA, we now always generate a DefId when encountering an AnonConst. This lines up with stable, which has a fake AnonConst DefId for a directly represented plain path generic parameter (i.e. the bullet point under the "stable" entry above). r? @BoxyUwU
…uments-wrapping, r=petrochenkov delegation: support mapping of all arguments with `Self` type This PR supports applying target expression to arguments of `Self` type. That the first part of this feature which touches AST -> HIR lowering only and allows lowering of delegation's block several times when there are no definitions inside. The second part will adjust typeck so we can apply adjustments to all mapped arguments as to the first argument of delegation. This should also eventually weak the condition of argument mapping allowing `Box<Self>`, `Arc<Self>`, etc. Part of rust-lang#118212. r? @petrochenkov
Rename some `body_id` to `body_def_id` Since body IDs and item IDs are distinct things, try to use names that do not conflate them. `body_def_id` is a little easier to read as "body-owning definition ID" whereas `body_id` is hard not to just read as "body ID". Related: rust-lang#158611 - I noticed this afterwards. I suspect that `FnCtxt` ought to keep `body_def_id` but maybe add `body_id: BodyId` in addition.
…i-obk Fix typetree generation for differentiated functions Further improvements after rust-lang#158278 This fixes a test failure on main (encountered while working on the PR above) in `tests/codegen-llvm/autodiff/autodiffv2.rs`. Further improvements are split out into rust-lang#158440, with high-level docs available in rust-lang/rustc-dev-guide#2911 Also noticed that I can (probably?) remove the llvm_enzyme cfg at this point, rust-lang#158460
powerpc64le_unknown_freebsd.rs: link with -lgcc Starting with FreeBSD 16.0, powerpc64le switches to IEEE long double. 128 bit arithmetics are implemented in LLVM's compiler_rt, which is FreeBSD's libgcc. Link with it so that building on FreeBSD 16.0 succeeds - noop for earlier releases.
…ror, r=marcoieni
Use `ci-mirrors` in `armhf-gnu` for {busybox, ubuntu rootfs} artifacts
## Summary
Use our `ci-mirrors` for busybox and ubuntu rootfs artifacts instead of relying on external network sources.
Context: [#t-infra > kernel.org is borked @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/kernel.2Eorg.20is.20borked/near/608261860)
---
try-job: armhf-gnu
…straints, r=petrochenkov delegation: add constraints to new generic args Constraints were not added to new generic args which caused them to be missing from HIR and this produced ICE. Fixes rust-lang#158812. Part of rust-lang#118212. r? @petrochenkov
Member
Author
|
@bors r+ rollup=never p=5 |
Contributor
This comment has been minimized.
This comment has been minimized.
rust-bors Bot
pushed a commit
that referenced
this pull request
Jul 7, 2026
Rollup of 8 pull requests Successful merges: - #156968 (diagnostics: suggest generic_const_args for const ops) - #158617 (allow mGCA const arguments to fall back to anon consts) - #158690 (delegation: support mapping of all arguments with `Self` type) - #158696 (Rename some `body_id` to `body_def_id`) - #158333 (Fix typetree generation for differentiated functions) - #158646 (powerpc64le_unknown_freebsd.rs: link with -lgcc) - #158802 (Use `ci-mirrors` in `armhf-gnu` for {busybox, ubuntu rootfs} artifacts) - #158905 (delegation: add constraints to new generic args)
Collaborator
|
The job Click to see the possible cause of the failure (guessed by this bot) |
Collaborator
|
The job Click to see the possible cause of the failure (guessed by this bot) |
Contributor
|
💔 Test for 69e9856 failed: CI. Failed job:
|
Contributor
|
PR #158617, which is a member of this rollup, was unapproved. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Successful merges:
Selftype #158690 (delegation: support mapping of all arguments withSelftype)body_idtobody_def_id#158696 (Rename somebody_idtobody_def_id)ci-mirrorsinarmhf-gnufor {busybox, ubuntu rootfs} artifacts #158802 (Useci-mirrorsinarmhf-gnufor {busybox, ubuntu rootfs} artifacts)r? @ghost
Create a similar rollup