Skip to content

Rollup of 6 pull requests - #165884

Closed
JonathanBrouwer wants to merge 28 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-xVHkJ0T
Closed

JonathanBrouwer wants to merge 28 commits into
rust-lang:mainfrom
JonathanBrouwer:rollup-xVHkJ0T

Conversation

@JonathanBrouwer

Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

scrabsha and others added 28 commits November 12, 2026 09:33
after some discussion, we decided we want view types to be `!Sized`, at
least at the beginning. this commit updates the test suite so that view
types are not passed by value anymore.
this commit is quite big because we want to always exhaustively match on
all the `TyKind` variants. none of the `unimplemented!()` is reachable
because we don't *actually* lower view types (yet!).
/!\ the test suite is has not been updated /!\

the `unreachable!()`s added previously are suddenly reached, triggering
literally all the view types test suite to ICE. this is fixed by the next
commit.
…ark-Simulacrum

compiletest: Add testing for lint machinery at runtime

While implementing rust-lang#157707, I noticed that we don't have 'runtime' tests for the diagnostic machinery (i.e. we test the derive macros themselves, but not their output when emitted). This introduces a new way to test this machinery.

- Add `//@ aux-lint: file.rs`, which builds a lint library in `auxiliary/file.rs`
- Lint libraries link with `rustc_private`, and export a `extern "C" fn register_lints(...)`
- A new `compiletest-lint-driver` wraps rustc and installs the provided lints when building the test

Included is a simple demo lint for example

_AI Disclosure: I used an LLM to plan out the broad structure of the machinery and identify issues; all code in this PR is written by hand_
…g, r=oli-obk

view-types: lower view types from HIR
…utes, r=oli-obk

reflection: reflect attributes from adts, fields, and variants

Introduced a new attribute tool `reflection_placeholder` behind the `TypeId` feature gate. Added intrinsics and methods to query there tool attributes from adts, fields, and variants.

Uncertain if the stringifying of the attribute objects before returning them is the right approach. Alternatively, a specific tool attribute structure could be introduced and returned instead of strings.

The feature gating also, erroneously, triggers when a user registers a tool attribute with the same name using the `register_tool` feature.
…ieyouxu

Update `sysinfo` version to `0.40.3`
cg_llvm: Use an invariant lifetime brand for LLVM attributes

This PR changes the type of LLVM attribute references from `&'ll Attribute` to `Attribute<'ll>` with an invariant lifetime brand, to help uphold soundness of the FFI bindings.

There should be no change to compiler output.

---

After the value migration, this step is thankfully much smaller.
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Nov 12, 2026
@rustbot rustbot added the A-attributes Area: Attributes (`#[…]`, `#![…]`) label Nov 12, 2026
@rustbot rustbot added 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-clippy Relevant to the Clippy team. 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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. T-rustfmt Relevant to the rustfmt team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Nov 12, 2026
@JonathanBrouwer

Copy link
Copy Markdown
Member Author

@bors r+ p=5 force

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

@rust-bors

rust-bors Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

📌 Commit e29e739 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 Nov 12, 2026
rust-bors Bot pushed a commit that referenced this pull request Nov 12, 2026
Rollup of 6 pull requests


try-job: dist-various-1
try-job: test-various
try-job: test-x86_64-gnu-aux
try-job: test-x86_64-msvc-1
try-job: test-aarch64-apple-1
try-job: test-aarch64-apple-2
try-job: test-x86_64-mingw-1
try-job: test-i686-msvc
try-job: test-armhf-gnu
try-job: test-x86_64-gnu-llvm-22-3
try-job: test-aarch64-msvc-2
@rust-bors

This comment has been minimized.

@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job test-x86_64-gnu-llvm-22-3 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
---- [ui] tests/ui-fulldeps/session-diagnostic/diagnostic-derive-compiletime.rs stdout ----

error: auxiliary build of /checkout/tests/ui-fulldeps/session-diagnostic/auxiliary/hello_lint.rs failed to compile: 
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/rustc" "/checkout/tests/ui-fulldeps/session-diagnostic/auxiliary/hello_lint.rs" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-sysroot" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui-fulldeps/session-diagnostic/diagnostic-derive-compiletime/auxiliary" "-Znext-solver=coherence" "-A" "internal_features" "-A" "incomplete_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Clink-arg=-L/usr/lib/llvm-22/lib\n" "--edition=2015" "--crate-type" "dylib" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui-fulldeps/session-diagnostic/diagnostic-derive-compiletime/auxiliary"
stdout: none
--- stderr -------------------------------
error[E0797]: base expression required after `..`
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/auxiliary/hello_lint.rs:15:1
   |
LL | / declare_tool_lint! {
LL | |     /// Test lint to test the lint testing.
LL | |     pub hello::HELLO_LINT,
LL | |     Deny,
LL | |     "warns on an binary expression"
LL | | }
   | |_^
   |

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Nov 12, 2026
…uwer

Rollup of 6 pull requests

Successful merges:

 - #157721 (compiletest: Add testing for lint machinery at runtime)
 - #165565 (view-types: lower view types from HIR)
 - #165810 (reflection: reflect attributes from adts, fields, and variants)
 - #165855 (Update `sysinfo` version to `0.40.3`)
 - #165861 (cg_llvm: Use an invariant lifetime brand for LLVM attributes)
 - #165872 (Some attribute related cleanups)
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job test-x86_64-gnu-llvm-22-3 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
---- [ui] tests/ui-fulldeps/session-diagnostic/diagnostic-derive-compiletime.rs stdout ----

error: auxiliary build of /checkout/tests/ui-fulldeps/session-diagnostic/auxiliary/hello_lint.rs failed to compile: 
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/rustc" "/checkout/tests/ui-fulldeps/session-diagnostic/auxiliary/hello_lint.rs" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-sysroot" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui-fulldeps/session-diagnostic/diagnostic-derive-compiletime/auxiliary" "-Znext-solver=coherence" "-A" "internal_features" "-A" "incomplete_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Clink-arg=-L/usr/lib/llvm-22/lib\n" "--edition=2015" "--crate-type" "dylib" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui-fulldeps/session-diagnostic/diagnostic-derive-compiletime/auxiliary"
stdout: none
--- stderr -------------------------------
error[E0797]: base expression required after `..`
##[error]  --> /checkout/tests/ui-fulldeps/session-diagnostic/auxiliary/hello_lint.rs:15:1
   |
LL | / declare_tool_lint! {
LL | |     /// Test lint to test the lint testing.
LL | |     pub hello::HELLO_LINT,
LL | |     Deny,
LL | |     "warns on an binary expression"
LL | | }
   | |_^
   |

@rust-bors rust-bors Bot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Nov 12, 2026
@rust-bors

rust-bors Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

💔 Test for 25e4bd8 failed: CI. Failed job:

@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-review Status: Awaiting review from the assignee but also interested parties. labels Nov 12, 2026
@rust-bors

rust-bors Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

PR #157721, which is a member of this rollup, was unapproved.

@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Nov 12, 2026
@rust-bors rust-bors Bot added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Nov 12, 2026
@rust-bors

rust-bors Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

💔 Test for 5c7a5ee failed: CI. Failed jobs:

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

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) A-compiletest Area: The compiletest test runner A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-rustc-dev-guide Area: rustc-dev-guide A-rustdoc-json Area: Rustdoc JSON backend A-testsuite Area: The testsuite used to check the correctness of rustc 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-clippy Relevant to the Clippy team. 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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. T-rustfmt Relevant to the rustfmt 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.

9 participants