Skip to content

Conversation

@Zalathar
Copy link
Member

@Zalathar Zalathar commented Dec 16, 2025

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

tshepang and others added 30 commits December 8, 2025 15:42
This also makes it more consistent with other text in the file
Perhaps the old name used to be accurate in the past, but nowadays most
injected dependencies are unconditionally linked too.
It is always identical to the list of values in cnum_map.
- Tested on QEMU OVMF.

Signed-off-by: Ayush Singh <[email protected]>
rust-analyzer needs to be able to visit types when treating not only `Ty`, `Const`, `Region` and `Predicate` specifically, but *all* rust-analyzer-made types specifically (excluding e.g. `TraitRef`, that is declared in rustc_type_ir). This is needed to implement garbage collection.

To support this, we introduce a second, rust-analyzer-only visit trait, named `GenericTypeVisitable`. It's simpler than `TypeVisitable` (for example, it does not have a trait for the visitor, and does not support early-returning) because this is what rust-analyzer needs, but its most distinguished feature is that the visitor is a generic of the *trait* instead of the *method*. This way, specific types can treat specific visitor types specifically and call their methods.

In rustc_type_ir we implement it for a bunch of basic types, and using a derive macro for the rest. The macro and trait are completely disabled when compiling for rustc (`feature = "nightly"`), so not even a compile time penalty will be paid.
…ts2, r=jdonszelmann

Warn on codegen attributes on required trait methods

This PR turns applying the following attributes on required trait methods (that is, trait methods **without** a default implementation) into a FCW:
- `#[cold]`
- `#[link_section]`
- `#[linkage]` (unstable)
- `#[rustc_allow_const_fn_unstable]` (internal attribute)

These attributes already had no effect when applied to a required trait method, this PR only adds a warning.

Furthermore, it adds a comment in the code that the following codegen attributes are *inherited* when applied to a required trait method:
- `#[track_caller]`
- `#[align]` (unstable)

````@rustbot```` labels +I-lang-nominated
````@rust-lang/lang````

Two questions for the lang team:
- Is adding this warning ok?
- Does the current behaviour of these attributes align with that you would expect them to be?

Fixes rust-lang#147432
…r=davidtwco,JonathanBrouwer

Add new Tier-3 target: riscv64im-unknown-none-elf

This PR proposes to add riscv64im-unknown-none-elf, a subset of the already supported riscv64imac-unknown-none-elf.

The motivation behind this PR is that we want to standardize (most) zkVMs on riscv64im-none and riscv64ima-none. Having different variants of riscv extensions, also seems to be within expectation, atleast with respects to riscv32.

Note: This does not mean that we will be able to remove [riscv32im-risc0-zkvm-elf](https://doc.rust-lang.org/rustc/platform-support/riscv32im-risc0-zkvm-elf.html) -- I am not aware of all of the dependents for this

**Tier-3 Policy**

> A tier 3 target must have a designated developer or developers (the "target maintainers") on record to be CCed when issues arise regarding the target. (The mechanism to track and CC such developers may evolve over time.)

I assigned  Rust Embedded Working Group, since they are already maintaining riscv64IMAC, though I am happy to assign myself.

> Targets must use naming consistent with any existing targets; for instance, a target for the same CPU or OS as an existing Rust target should use the same name for that CPU or OS. Targets should normally use the same names and naming conventions as used elsewhere in the broader ecosystem beyond Rust (such as in other toolchains), unless they have a very good reason to diverge. Changing the name of a target can be highly disruptive, especially once the target reaches a higher tier, so getting the name right is important even for a tier 3 target.

It follows the naming convention of the other bare metal riscv targets

> Tier 3 targets may have unusual requirements to build or use, but must not create legal issues or impose onerous legal terms for the Rust project or for Rust developers or users.

This has the same requirements as riscv{32, 64}imac

> Neither this policy nor any decisions made regarding targets shall create any binding agreement or estoppel by any party. If any member of an approving Rust team serves as one of the maintainers of a target, or has any legal or employment requirement (explicit or implicit) that might affect their decisions regarding a target, they must recuse themselves from any approval decisions regarding the target's tier status, though they may otherwise participate in discussions.

> Tier 3 targets should attempt to implement as much of the standard libraries as possible and appropriate (core for most targets, alloc for targets that can support dynamic memory allocation, std for targets with an operating system or equivalent layer of system-provided functionality), but may leave some code unimplemented (either unavailable or stubbed out as appropriate), whether because the target makes it impossible to implement or challenging to implement. The authors of pull requests are not obligated to avoid calling any portions of the standard library on the basis of a tier 3 target not implementing those portions.

> The target must provide documentation for the Rust community explaining how to build for the target, using cross-compilation if possible. If the target supports running binaries, or running tests (even if they do not pass), the documentation must explain how to run such binaries or tests for the target, using emulation if possible or dedicated hardware if necessary.

> Tier 3 targets must not impose burden on the authors of pull requests, or other developers in the community, to maintain the target. In particular, do not post comments (automated or manual) on a PR that derail or suggest a block on the PR based on a tier 3 target. Do not send automated messages or notifications (via any medium, including via ````@)```` to a PR author or others involved with a PR regarding a tier 3 target, unless they have opted into such messages.

> Patches adding or updating tier 3 targets must not break any existing tier 2 or tier 1 target, and must not knowingly break another tier 3 target without approval of either the compiler team or the maintainers of the other tier 3 target.

> Tier 3 targets must be able to produce assembly using at least one of rustc's supported backends from any host target. (Having support in a fork of the backend is not sufficient, it must be upstream.)

Acknowledging the above.
feat: dlopen Enzyme

related issue: rust-lang#145899
related pr: rust-lang#146623

This PR is a continuation of rust-lang#146623

I refactored some code for rust-lang#146623 and added the functions shown in rust-lang#144197

r? ````@bjorn3````
cc: ````@ZuseZ4````

Zulip link: https://rust-lang.zulipchat.com/#narrow/channel/182449-t-compiler.2Fhelp/topic/libload.20.2F.20dlopen.20Enzyme.2Fautodiff/near/553647912
std: sys: fs: uefi: Implement set_times and set_perm

- Tested on QEMU OVMF.
bootstrap readme: make easy to read when editor wrapping is not enabled

This also makes it more consistent with other text in the file
… r=jackh726

Provide an extended framework for type visit, for use in rust-analyzer

rust-analyzer needs to be able to visit types when treating not only `Ty`, `Const`, `Region` and `Predicate` specifically, but *all* rust-analyzer-made types specifically (excluding e.g. `TraitRef`, that is declared in rustc_type_ir). This is needed to implement garbage collection.

To support this, we introduce a second, rust-analyzer-only visit trait, named, without much thought, `CustomizableTypeVisitable`. It's simpler than `TypeVisitable` (for example, it does not have a trait for the visitor, and does not support early-returning) because this is what rust-analyzer needs, but its most distinguished feature is that the visitor is a generic of the *trait* instead of the *method*. This way, specific types can treat specific visitor types specifically and call their methods.

In rustc_type_ir we implement it for a bunch of basic types, and using a derive macro for the rest. The macro and trait are completely disabled when compiling for rustc (`feature = "nightly"`), so not even a compile time penalty will be paid.

r? types

This is a replacement to other efforts to support non-`Copy` type in the solver, replacing them with a GC in r-a, as decided by ``@rust-lang/rust-analyzer.`` The code is tiny in comparison, and I believe T-types will have no problem maintaining it, which mostly means adding the derive on new things when they are added and things break on the r-a side.
…m, r=jdonszelmann

Simplify how inline asm handles `MaybeUninit`

This is just better, but this is also allows it to handle changes from rust-lang#149614 (i.e. `ManuallyDrop` containing `MaybeDangle`).
…=jieyouxu

Metadata loader cleanups

Couple of cleanups I found while working on rust-lang#149273

This renames some fields and enum variants to clarify what they are used for, moves a check to another method and slightly simplifies the way profiler_builtins is linked.
do not add `I-prioritize` when `F-*` labels are present
…=Zalathar

Use the embeddable filename for coverage artifacts

Like debuginfo, coverage artifacts should use the embeddable path (aka absolute path).

Unfortunately due to `coverage-run` and `compiletest`, I'm unable to create a reproducer in our test-suite, but when manually invoking `rustc` with the reproducer (rust-lang#150020 (comment)) I think the issue is fixed.

Fixes rust-lang#150020
r? Zalathar
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-meta Area: Issues & PRs about the rust-lang/rust repository itself F-autodiff `#![feature(autodiff)]` S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) rollup A PR which is a rollup labels Dec 16, 2025
@Zalathar
Copy link
Member Author

Rollup of everything. Subset of #150039.

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Dec 16, 2025

📌 Commit f9d6cb5 has been approved by Zalathar

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 16, 2025
@Zalathar
Copy link
Member Author

@bors try jobs=dist-x86_64-linux-alt

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Dec 16, 2025
Rollup of 13 pull requests

try-job: dist-x86_64-linux-alt
@rust-bors
Copy link

rust-bors bot commented Dec 16, 2025

☀️ Try build successful (CI)
Build commit: 6ba0e8d (6ba0e8d5479f2e619470eed5b3240e1d59abe753, parent: cec70080fd441d16e9fb08a0d1d1a04c72d1ed25)

@bors
Copy link
Collaborator

bors commented Dec 16, 2025

⌛ Testing commit f9d6cb5 with merge 6e7dd2c...

@bors
Copy link
Collaborator

bors commented Dec 16, 2025

☀️ Test successful - checks-actions
Approved by: Zalathar
Pushing 6e7dd2c to main...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Dec 16, 2025
@bors bors merged commit 6e7dd2c into rust-lang:main Dec 16, 2025
13 checks passed
@rustbot rustbot added this to the 1.94.0 milestone Dec 16, 2025
@Zalathar Zalathar deleted the rollup-sa5nez6 branch December 16, 2025 09:37
@github-actions
Copy link
Contributor

What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing cec7008 (parent) -> 6e7dd2c (this PR)

Test differences

Show 236 test diffs

Stage 0

  • spec::tests::riscv64im_unknown_none_elf: [missing] -> pass (J0)

Stage 1

  • [assembly] tests/assembly-llvm/targets/targets-elf.rs#riscv64im_unknown_none_elf: [missing] -> pass (J0)
  • [ui] tests/ui/attributes/codegen_attr_on_required_trait_method.rs: [missing] -> pass (J0)
  • spec::tests::riscv64im_unknown_none_elf: [missing] -> pass (J3)

Stage 2

  • [assembly] tests/assembly-llvm/targets/targets-elf.rs#riscv64im_unknown_none_elf: [missing] -> pass (J1)
  • [ui] tests/ui/attributes/codegen_attr_on_required_trait_method.rs: [missing] -> pass (J2)

Additionally, 230 doctest diffs were found. These are ignored, as they are noisy.

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 6e7dd2cd99697b45b548069977dbdac623786a8a --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. dist-aarch64-msvc: 5450.7s -> 6237.8s (+14.4%)
  2. dist-arm-linux-gnueabi: 5262.9s -> 4503.8s (-14.4%)
  3. x86_64-gnu-llvm-21-2: 4865.1s -> 5541.1s (+13.9%)
  4. dist-x86_64-apple: 7378.7s -> 6575.7s (-10.9%)
  5. aarch64-apple: 10793.8s -> 9659.7s (-10.5%)
  6. dist-apple-various: 4019.7s -> 3598.1s (-10.5%)
  7. x86_64-gnu-llvm-20: 5072.3s -> 4555.4s (-10.2%)
  8. dist-aarch64-llvm-mingw: 5702.4s -> 6209.4s (+8.9%)
  9. dist-aarch64-apple: 7772.5s -> 8430.0s (+8.5%)
  10. pr-check-1: 1624.4s -> 1747.8s (+7.6%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#148756 Warn on codegen attributes on required trait methods 0089ddd18cbcc0434468041efc9434689e97f928 (link)
#148790 Add new Tier-3 target: riscv64im-unknown-none-elf 38b8d116a9bcd5c287d03e795b5904ae198d8d5a (link)
#149271 feat: dlopen Enzyme 8697dc4a21a3fc76db2127e3fdd105d713bbdf18 (link)
#149459 std: sys: fs: uefi: Implement set_times and set_perm d8acc9471b1710abed23810ddeeb3e1f2e350047 (link)
#149771 bootstrap readme: make easy to read when editor wrapping is… 9f2da05b38f076c4935b1b5ff2d79339fc672f4e (link)
#149856 Provide an extended framework for type visit, for use in ru… 11317d69b25170b1230843083569b0494af58329 (link)
#149950 Simplify how inline asm handles MaybeUninit 3e82c401ccd42b8e0b1a6f7a119c8329a64e100b (link)
#150014 Metadata loader cleanups 434f4736ddd63f7c1a2f20a2e0df2ed1eeea186d (link)
#150021 document that mpmc channels deliver an item to (at most) on… 41776383871ede814a801bf8d2077b01d1c9219f (link)
#150029 Update books 668bb547d0d7260929edba9e498258581b341828 (link)
#150031 assert impossible branch is impossible 0a42250a972e42640eae3de4b2a685b663867b44 (link)
#150034 do not add I-prioritize when F-* labels are present 8def59252485ae5e7ea1af96b7df6289c7d78586 (link)
#150036 Use the embeddable filename for coverage artifacts a63034155185aed4b73035244b5db704b8e22b42 (link)

previous master: cec70080fd

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (6e7dd2c): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.2% [-0.3%, -0.2%] 4
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary -1.4%, secondary 3.3%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
3.3% [3.3%, 3.3%] 1
Improvements ✅
(primary)
-1.4% [-1.4%, -1.4%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -1.4% [-1.4%, -1.4%] 1

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 479.175s -> 478.748s (-0.09%)
Artifact size: 390.21 MiB -> 390.23 MiB (0.01%)

@bjorn3
Copy link
Member

bjorn3 commented Dec 16, 2025

The perf changes (both large-workspace improvements and minor regressions across the board) seem to be completely explained by #150014.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-meta Area: Issues & PRs about the rust-lang/rust repository itself F-autodiff `#![feature(autodiff)]` merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)

Projects

None yet

Development

Successfully merging this pull request may close these issues.