Skip to content

Rollup of 6 pull requests - #160138

Closed
JonathanBrouwer wants to merge 17 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-Hyk2qAG
Closed

Rollup of 6 pull requests#160138
JonathanBrouwer wants to merge 17 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-Hyk2qAG

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

rcvalle and others added 17 commits July 20, 2026 20:32
Adds support for encoding constants of types allowed by the
adt_const_params and unsized_const_params features (i.e., char, str,
tuple, array, slice, struct, enum, and reference values) as literal
arguments, and fixes the encoding of bool values to be 0 and 1, and of
negative integer values to be their decimal values preceded by n.
When `-Z implicit-sysroot-deps=false`, the sysroot is not added to the list of search paths for resolving top level dependencies.
One UI test that fails to find crate `std` as it does not look in the sysroot.
One UI test that which only transitively depends on std, and thus it is
searched for in the sysroot.
1) Depending transitively on a lib in the sysroot resolves fine with `-Zimplicit-sysroot-deps=false`
2) Depending directly on a lib in the sysroot does not resolve implicitly with `-Zimplicit-sysroot-deps=false`
…bjorn3

Remove llvm_enzyme feature outside of bootstrap

r? bjorn3
I think you were the one who did the last refactoring on how we pass this feature.

We originally introduced and used this compile-time cfg since we were suspecting that some of the work we did for autodiff was causing a compile time regression even when no autodiff was used. It turned out later that we just did extra work due to a bug, which was fixed.

Thanks to the dlopen work our checks are now much simpler. We only do autodiff work if the -Zautodiff=Enable flag was set. If the flag is set we also just check if libEnzyme is in the sysroot, and if we can not find it, we error out.

I noticed it while fixing some related checks in rust-lang#158333
CFI: Add support for the adt_const_params feature

Adds support for encoding constants of types allowed by the adt_const_params and unsized_const_params features (i.e., char, str, tuple, array, slice, struct, enum, and reference values) as literal arguments, and fixes the encoding of bool values to be 0 and 1, and of negative integer values to be their decimal values preceded by n (fixes rust-lang#159299).
Add semver check test command for checking API compatibility of stdlib

This PR adds a new test to bootstrap (not executed by default at the moment) that checks the API compatibility of the standard library using the https://github.com/obi1kenobi/cargo-semver-checks tool.

The command can be executed using `x test std-semver-check`.

(Note: I realized that `x dist rust-docs-json` executed twice in a row invalidates Cargo cache for some reason, that is a separate issue though).

The test is not yet executed on CI, I would do that in a separate PR (maybe pending a t-libs FCP or something).

The test checks that c-s-c is installed, and then uses git to lookup a parent baseline commit (in a future extension, we should make the baseline commit be configurable through `config.toml`). Then it downloads the corresponding `rust-docs-json` component of that commit from CI and extracts it. It generates the same JSON docs component from local sources, and then runs c-s-c on those two JSON files to compare their API.

Output when API stability is broken:

```
Checking semver compatibility of core
    Checking <unknown> v1.99.0-nightly  (d527bc9      2026-07-20) -> v1.99.0-dev (assume minor change)
     Checked [   1.282s] 196 checks: 196 pass, 57 skip
     Summary no semver update required
    Finished [   2.368s] <unknown>
Checking semver compatibility of alloc
    Checking <unknown> v1.99.0-nightly  (d527bc9      2026-07-20) -> v1.99.0-dev (assume minor change)
     Checked [   0.030s] 196 checks: 196 pass, 57 skip
     Summary no semver update required
    Finished [   0.127s] <unknown>
Checking semver compatibility of std
    Checking <unknown> v1.99.0-nightly  (d527bc9      2026-07-20) -> v1.99.0-dev (assume minor change)
     Checked [   0.055s] 196 checks: 195 pass, 1 fail, 0 warn, 57 skip

--- failure function_missing: pub fn removed or renamed ---

Description:
A publicly-visible function cannot be imported by its prior path. A `pub use` may have been removed, or the function itself may have been renamed or removed entirely.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.49.0/src/lints/function_missing.ron

Failed in:
  function std::process::id, previously in file library/std/src/process.rs:2656

     Summary semver requires new major version: 1 major and 0 minor checks failed
    Finished [   0.243s] <unknown>
```

CC @obi1kenobi @Amanieu

r? @jieyouxu
…it-sysroot-deps, r=nnethercote

Add `-Zimplicit-sysroot-deps`

This PR, originally authored by @CrooseGit, adds support for a new flag [proposed in the `build-std=always` RFC](https://rust-lang.github.io/rfcs/3874-build-std-always.html#preventing-implicit-sysroot-dependencies). It unblocks work by @Bryanskiy around handling panic strategies in build-std, for which rustc must look for them in `-Ldependency` locations and not the sysroot.

`-Zimplicit-sysroot-deps` is true by default. When false, rustc will not look in the sysroot when attempting to resolve direct dependencies. It is intended to be used by Cargo when using build-std to improve error messages, avoiding the common "duplicate lang item in crate `core`" error that occurs when not all required standard library crates have been built.

Not included in this PR is the behaviour around dependencies injected by rustc in `rustc_metadata`, such as panic runtimes and compiler-builtins, which will be addressed in the future.
…ouxu

Show jobs where a given test was executed in `test-dashboard`

This lets us see the specific set of jobs where a given test was executed on CI. This should be quite useful e.g. for debugging where we run debuginfo tests.

To test:
```bash
$ cargo run --release --manifest-path src/ci/citool/Cargo.toml -- test-dashboard 008fa22 --output-dir test-dashboard
```

r? @jieyouxu
…ouxu

add additional license option for third-party dependencies
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Jul 29, 2026
@rustbot rustbot added A-CI Area: Our Github Actions CI A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc A-tidy Area: The tidy tool PG-exploit-mitigations Project group: Exploit mitigations 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-infra Relevant to the infrastructure 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. labels Jul 29, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Member Author

@bors r+ rollup=never p=5

Trying commonly failed jobs
@bors try jobs=dist-various-1,test-various,x86_64-gnu-aux,x86_64-gnu-llvm-21-3,x86_64-msvc-1,aarch64-apple,x86_64-mingw-1,i686-msvc-*

@rust-bors

rust-bors Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 8571c87 has been approved by JonathanBrouwer

It is now in the queue for this repository.

@rust-bors rust-bors Bot 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 Jul 29, 2026
@rust-bors

rust-bors Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

⌛ Trying commit 8571c87 with merge 38ab417

To cancel the try build, run the command @bors try cancel.

Workflow: https://github.com/rust-lang/rust/actions/runs/30443321365

rust-bors Bot pushed a commit that referenced this pull request Jul 29, 2026
Rollup of 6 pull requests


try-job: dist-various-1
try-job: test-various
try-job: x86_64-gnu-aux
try-job: x86_64-gnu-llvm-21-3
try-job: x86_64-msvc-1
try-job: aarch64-apple
try-job: x86_64-mingw-1
try-job: i686-msvc-*
@JonathanBrouwer

Copy link
Copy Markdown
Member Author

@bors try cancel

@rust-bors

rust-bors Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Try build cancelled. Cancelled workflows:

@rust-bors rust-bors Bot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jul 29, 2026
@rust-bors

rust-bors Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

This pull request was unapproved due to being closed.

@JonathanBrouwer
JonathanBrouwer deleted the rollup-Hyk2qAG branch August 21, 2026 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CI Area: Our Github Actions CI A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc A-tidy Area: The tidy tool PG-exploit-mitigations Project group: Exploit mitigations rollup A PR which is a rollup S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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-infra Relevant to the infrastructure 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants