GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Rollup of 8 pull requests by JonathanBrouwer · Pull Request #156232 · rust-lang/rust

Conversation

@JonathanBrouwer

@JonathanBrouwer JonathanBrouwer commented May 6, 2026 •
edited by rustbot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Successful merges:

  • lint ImproperCTypes: refactor linting architecture (part 2) #146273 (lint ImproperCTypes: refactor linting architecture (part 2))
  • Lint unused pub items in binary crates #149509 (Lint unused pub items in binary crates)
  • Support -Cpanic=unwind on WASI targets #156061 (Support -Cpanic=unwind on WASI targets)
  • Fewer global node_id_to_def_id lookups #156173 (Fewer global node_id_to_def_id lookups)
  • Deny warnings in the test for crates that are available on stable #155961 (Deny warnings in the test for crates that are available on stable)
  • Metadata macro/query cleanups #156131 (Metadata macro/query cleanups)
  • Resolve some cases of #132279 by using the right typing mode in the next solver #156141 (Resolve some cases of Tracking issue for TypingMode transition #132279 by using the right typing mode in the next solver)
  • llvm: Use correct type for splat mask #156202 (llvm: Use correct type for splat mask)

r? @ghost

Create a similar rollup

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
mu001999 and others added 27 commits April 22, 2026 23:36
@mu001999
Refactor dead code liveness plumbing
97ca81c
@mu001999
Implement unused_pub_items_in_binary lint
a4f8fce
@mu001999
Rename unused_pub_items_in_binary to dead_code_pub_in_binary
93abcca
@nnethercote
Some arena macro tweaks.
0d0aaa1
- Improve a comment.
- Remove unused `[decode]` annotations on some arenas.
- Improve `impl_arena_allocatable_decoder`:
  - Make the first rule more like the second rule.
  - Remove unnecessary brackets.
  - Remove unused support for attributes other than `decode`.
@nnethercote
Fix a metadata table name.
cdefdd0
The table names usually match the name of the corresponding query.
The `trait_impl_trait_tys` table is an exception; this commit renames it
`collect_return_position_impl_trait_in_trait_tys` to match the query.
@jdonszelmann
remove param_env from HasTypingEnv
e283cb3
@jdonszelmann
use the right typing mode for each mir phase
feee5f6
@jdonszelmann
use the right typing mode in lints
ab63680
@alexcrichton
Support -Cpanic=unwind on WASI targets
13c6e60
This commit is some minor updates/restructuring in a few locations with
the end result being supporting `-Cpanic=unwind` on WASI targets. This
continues to be off-by-default insofar as WASI targets default to
`-Cpanic=abort`, meaning that actually using anything in this commit
requires `-Zbuild-std`. Specifically the changes made here are:

* The self-contained sysroot for WASI targets now contains a copy of
  `libunwind.a` from wasi-sdk, first shipped with wasi-sdk-33 (also
  updated here).
* The `unwind` crate here in this repository uses the `libunwind` module
  instead of the custom bare-metal wasm implementation of exceptions.
  This means that Rust uses the `_Unwind_*` symbols which allows it to
  interoperate with C/C++/etc.
* Wasm targets are all updated to pass the LLVM argument
  `-wasm-use-legacy-eh=false` to differ from LLVM's/clang's default of
  using the legacy exception handling proposal for WebAssembly. This has
  no effect by default because `panic=abort` is used on most targets.
  Emscripten is exempted from this as the Emscripten target is
  explicitly intended to follow LLVM's/clang's defaults.
* There's a single test in the test suite that links to the
  `panic_unwind` crate which ended up requiring `-Wexceptions` from
  Wasmtime, so the test parts were updated and Wasmtime was updated in
  CI, too.

The net result of all of this is that this should not actually affect
any WebAssembly target's default behavior. Optionally, though, WASI
programs can be built with exception handling via:

    RUSTFLAGS='-Cpanic=unwind' cargo +nightly run -Z build-std --target wasm32-wasip2

Effectively `-Zbuild-std` and `-Cpanic=unwind` is all that's necessary
to enable this support on wasm targets.

Finally, this ends up closing 154593 as well. The WASI targets are now
defined to use `-lunwind` to implement unwinding. This means that the
in-tree definition of `__cpp_exception` is no longer of concern and the
definition is always sourced externally. If Rust is linked with other
C/C++ code using WASI then these idioms are compatible with wasi-sdk,
for example, to use that as a linker. The main caveat is that when using
an external linker the `-fwasm-exceptions` argument needs to be passed
to `clang` for it to be able to find the `libunwind.a` library to link
against.

Closes 154593
@maurer
llvm: Use correct type for splat mask
3c83d3a
After llvm/llvm-project#195486 , LLVM has explicit handling for null
pointers in simd operations instead of using special handling based on
zeroes.

This causes LLVM with asserts enabled to detect an improperly typed mask
passed to splat (if the output vector does not have i32 elements), and
can cause SIGSEGV in more complex cases with asserts disabled.
@niacdoial
ImproperCTypes: merge outer_ty information into VisitorState
411a932
Another user-transparent change, unifying outer-type information and the
existing VisitorState flags.
@niacdoial
ImproperCTypes: Use more Unnormalized type wrappers
6839797
In order to follow along with the efforts to properly distinguish
already-normalised and unnormalized types, we separate the internal
interfaces of this lint that rely on normalized types from those that
do not. We do that by adding the `Unnormalized` wrapper to some
interfaces.
@jdonszelmann
move drop bomb from OpaqueTypeStorage into InferCtxt's Drop
da70164
@jdonszelmann
Deny warnings in rustc crates on stable
814fc17
@oli-obk
Avoid some global node_id_to_def_id lookups in import resolution
0afe083
@oli-obk
Avoid using id followed by local_def_id if we can just call `def_…
191cda5
…id` instead
@oli-obk
Avoid hitting the global node_id_to_def_id table for unused macros
400240a
@oli-obk
Follow-up cleanups reusing the now-available LocalDefIds
a082567
@jdonszelmann
fix warnings in rustc_type_ir
b8e547a
@JonathanBrouwer
Rollup merge of rust-lang#146273 - niacdoial:improperctypes-refactor2…
995e674
…, r=petrochenkov

lint ImproperCTypes: refactor linting architecture (part 2)

This is the second PR in an effort to split rust-lang#134697 (refactor plus overhaul of the ImproperCTypes family of lints) into individually-mergeable parts.

Contains the changes of the first PR, and splits the core type checking function into several bits, each focused on a specific aspect of FFI-safety.
Some logic which was outside of said core function was also moved into the new functions.

Superset of: rust-lang#146271
@JonathanBrouwer
Rollup merge of rust-lang#149509 - mu001999-contrib:flag/pub-as-pub-c…
29320ed
…rate, r=jdonszelmann

Lint unused pub items in binary crates

~~This PR adds a new unstable flag -Ztreat-pub-as-pub-crate as [@Kobzol](https://github.com/Kobzol) suggested.~~
~~When compiling binary crates with this flag, the seed worklist will only contain the entry fn and won't contain other reachable items. Then we can do the dead code analysis for pub items just like they are pub(crate).~~

Related zulip thread [#general > pub/pub(crate) within a binary is a footgun](https://rust-lang.zulipchat.com/#narrow/channel/122651-general/topic/pub.2Fpub.28crate.29.20within.20a.20binary.20is.20a.20footgun/with/558931034).

---

Updated:

Adds a new lint `unused_pub_items_in_binary` (crate-level, default allow for now) instead of the previous unstable flag to lint unused `pub` items for binary crates.

See more details of implementation in rust-lang#149509 (comment).

This lint is allowed by default, but I believe this has been better than the unstable flag. Making it warn-by-default will lead to a lot of noise for this PR (like bless many tests). So I'd like to make it warn-by-default in a separate PR in the future.
@JonathanBrouwer
Rollup merge of rust-lang#156061 - alexcrichton:unwinding-onw-asi, r=…
ab20da2
…bjorn3

Support `-Cpanic=unwind` on WASI targets

This commit is some minor updates/restructuring in a few locations with the end result being supporting `-Cpanic=unwind` on WASI targets. This continues to be off-by-default insofar as WASI targets default to `-Cpanic=abort`, meaning that actually using anything in this commit requires `-Zbuild-std`. Specifically the changes made here are:

* The self-contained sysroot for WASI targets now contains a copy of `libunwind.a` from wasi-sdk, first shipped with wasi-sdk-33 (also updated here).
* The `unwind` crate here in this repository uses the `libunwind` module instead of the custom bare-metal wasm implementation of exceptions. This means that Rust uses the `_Unwind_*` symbols which allows it to interoperate with C/C++/etc.
* Wasm targets are all updated to pass the LLVM argument `-wasm-use-legacy-eh=false` to differ from LLVM's/clang's default of using the legacy exception handling proposal for WebAssembly. This has no effect by default because `panic=abort` is used on most targets. Emscripten is exempted from this as the Emscripten target is explicitly intended to follow LLVM's/clang's defaults.
* There's a single test in the test suite that links to the `panic_unwind` crate which ended up requiring `-Wexceptions` from Wasmtime, so the test parts were updated and Wasmtime was updated in CI, too.

The net result of all of this is that this should not actually affect any WebAssembly target's default behavior. Optionally, though, WASI programs can be built with exception handling via:

    RUSTFLAGS='-Cpanic=unwind' cargo +nightly run -Z build-std --target wasm32-wasip2

Effectively `-Zbuild-std` and `-Cpanic=unwind` is all that's necessary to enable this support on wasm targets.

Finally, this ends up closing rust-lang#154593 as well. The WASI targets are now defined to use `-lunwind` to implement unwinding. This means that the in-tree definition of `__cpp_exception` is no longer of concern and the definition is always sourced externally. If Rust is linked with other C/C++ code using WASI then these idioms are compatible with wasi-sdk, for example, to use that as a linker. The main caveat is that when using an external linker the `-fwasm-exceptions` argument needs to be passed to `clang` for it to be able to find the `libunwind.a` library to link against.

Closes rust-lang#154593
@JonathanBrouwer
Rollup merge of rust-lang#156173 - oli-obk:fewer-global-lookups, r=pe…
b0d8326
…trochenkov

Fewer global node_id_to_def_id lookups

Several of these are unnecessary if we track the `LocalDefId` together with the `NodeId`. We can't remove the `NodeId` entirely, as it is needed for lints, but it's a useful refactoring for splitting node_id_to_def_id into a per-owner table in the future

r? @petrochenkov
@JonathanBrouwer
Rollup merge of rust-lang#155961 - jdonszelmann:deny-warnings-stable,…
fef4d52
… r=mejrs

Deny warnings in the test for crates that are available on stable

We've got a couple of crates, like `rustc_type_ir` that have parts disabled on stable. I believe part of this is so, for example, rust-analyzer can use bits of the compiler. We previously allowed warnings here, and I ran into one. This denies warnings in the test that compiles these stable crates (I chose not to on the crate itself, so you don't *constantly* run into the warnings if you have turned that off in `config.toml`). This test doesn't run by default, but it does run in CI.
@JonathanBrouwer
Rollup merge of rust-lang#156131 - nnethercote:rm-unnecessary-decode,…
d2a81cd
… r=Zalathar

Metadata macro/query cleanups

Details in individual commits.

r? @Zalathar
@JonathanBrouwer
Rollup merge of rust-lang#156141 - jdonszelmann:use-right-typingmode,…
8846256
… r=lcnr

Resolve some cases of rust-lang#132279 by using the right typing mode in the next solver

r? @lcnr

Convert 3 FIXMEs of rust-lang#132279 to using the right typing mode when we can (`tcx.use_typing_mode_borrowck()`)

Also resolves rust-lang#155093, which I closed
@JonathanBrouwer
Rollup merge of rust-lang#156202 - maurer:splat, r=nikic
291257c
llvm: Use correct type for splat mask

After llvm/llvm-project#195486 , LLVM has explicit handling for null pointers in simd operations instead of using special handling based on zeroes.

This causes LLVM with asserts enabled to detect an improperly typed mask passed to splat (if the output vector does not have i32 elements), and can cause SIGSEGV in more complex cases with asserts disabled.

@rustbot label: +llvm-main

r? @durin42
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label May 6, 2026
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-CI Area: Our Github Actions CI labels May 6, 2026
@rustbot rustbot added 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 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. labels May 6, 2026
@JonathanBrouwer

JonathanBrouwer commented May 6, 2026

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-2

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@rust-bors

rust-bors Bot commented May 6, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 291257c has been approved by JonathanBrouwer

It is now in the queue for this repository.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@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 May 6, 2026
@rust-bors

rust-bors Bot commented May 6, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

⌛ Trying commit 291257c with merge 2382abf…

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

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

rust-bors Bot pushed a commit that referenced this pull request May 6, 2026
@bors
Auto merge of #156232 - JonathanBrouwer:rollup-ZLlmJLc, r=<try>
2382abf
Rollup of 8 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-2
@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 May 6, 2026
@rust-bors

rust-bors Bot commented May 6, 2026

Copy link
Copy Markdown
Contributor

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

This rollup was thus unapproved.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@rust-bors rust-bors Bot removed the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label May 6, 2026
@rust-bors rust-bors Bot mentioned this pull request May 6, 2026
Lint unused pub items in binary crates #149509
Merged
@JonathanBrouwer

JonathanBrouwer commented May 6, 2026

Copy link
Copy Markdown
Member Author

@bors try cancel

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@rust-bors

rust-bors Bot commented May 6, 2026

Copy link
Copy Markdown
Contributor

Try build cancelled. Cancelled workflows:

  • https://github.com/rust-lang/rust/actions/runs/25429576032
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@JonathanBrouwer JonathanBrouwer closed this May 6, 2026
@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 May 6, 2026
@rust-log-analyzer

rust-log-analyzer commented May 6, 2026

Copy link
Copy Markdown
Collaborator

The job x86_64-gnu-miri failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@rust-log-analyzer

rust-log-analyzer commented May 6, 2026

Copy link
Copy Markdown
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) 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 rollup A PR which is a rollup 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.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

10 participants

@JonathanBrouwer @rust-log-analyzer @rustbot @mu001999 @nnethercote @jdonszelmann @alexcrichton @maurer @niacdoial @oli-obk
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.