Skip to content

Use recognizer functions for enums and tuple structs - #160791

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
Walnut356:enum_recog
Aug 10, 2026
Merged

Use recognizer functions for enums and tuple structs#160791
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
Walnut356:enum_recog

Conversation

@Walnut356

Copy link
Copy Markdown
Contributor
  • I did not use an LLM to create a change in this PR.
  • I used an LLM to create a change in this PR, and I have explained below how it was used.

Non-urgent, but related to #160331

We currently shove most user defined types through synthetic_lookup as I hadn't gotten around to using type recognizers yet. If we want tests to skip outputting types when the type doesn't have a visualizer, we should also not attach a (useless) visualizer to most UDTs.

The only things synthetic_lookup catches that aren't already caught by the regexes are tuple-structs and sum-type enums. This patch adds targeted type recognizers for those, and no longer sends types through synthetic_lookup at all on LLDB 19+

this doesn't affect pretty-std.rs since all those types have visualizers, but it will affect other tests if/when they're converted (e.g. tests/debuginfo/struct-in-struct.rs)

r? @Kobzol, @jieyouxu

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 9, 2026
@rustbot

rustbot commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

Kobzol is not on the review rotation at the moment.
They may take a while to respond.

@Kobzol

Kobzol commented Aug 10, 2026

Copy link
Copy Markdown
Member

Tested this on a simple user struct, looks to work fine. Let's try CI:

@bors try jobs=aarch64-apple-1,aarch64-apple-2

rust-bors Bot pushed a commit that referenced this pull request Aug 10, 2026
Use recognizer functions for enums and tuple structs


try-job: aarch64-apple-1
try-job: aarch64-apple-2
@rust-bors

This comment has been minimized.

@rust-bors

rust-bors Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: a3ad8ca (a3ad8cac67556eab3b7c2870642cea4e0011fb6b)
Base parent: 8a2fbe3 (8a2fbe3ea881ec68b9f06510fd1a1484cdf5bb6b)

@Kobzol

Kobzol commented Aug 10, 2026

Copy link
Copy Markdown
Member

Ok, looks good, thank you! Let's try.

@bors r+

@rust-bors

rust-bors Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 5395227 has been approved by Kobzol

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 Aug 10, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Aug 10, 2026
Use recognizer functions for enums and tuple structs

Non-urgent, but related to rust-lang#160331

We currently shove most user defined types through `synthetic_lookup` as I hadn't gotten around to using type recognizers yet. If we want tests to skip outputting types when the type doesn't have a visualizer, we should also not attach a (useless) visualizer to most UDTs.

The only things `synthetic_lookup` catches that aren't already caught by the regexes are tuple-structs and sum-type enums. This patch adds targeted type recognizers for those, and no longer sends types through `synthetic_lookup` at all on LLDB 19+

this doesn't affect `pretty-std.rs` since all those types have visualizers, but it will affect other tests if/when they're converted (e.g. `tests/debuginfo/struct-in-struct.rs`)

r? @Kobzol, @jieyouxu
rust-bors Bot pushed a commit that referenced this pull request Aug 10, 2026
…uwer

Rollup of 9 pull requests

Successful merges:

 - #158404 (trait_solver: normalize next-gen region constraints)
 - #160631 (Do not eagerly download rustfmt in bootstrap)
 - #160642 (mir: prohibit projection into scalable vec)
 - #160749 (MaybeDangling: ensure references fit inside the address space)
 - #160791 (Use recognizer functions for enums and tuple structs)
 - #160500 (Fix inaccurate description for crate and pathroot)
 - #160590 (Docs & bors: Replace mentions of libs-api with libs)
 - #160825 (Fix references to unsupported on sys::paths::unix)
 - #160852 (Use `remove_dir_all` for `./x clean`)

Failed merges:

 - #160829 (bootstrap: Make `main.rs` a stub that calls into the library crate)
@rust-bors
rust-bors Bot merged commit 5b52e5e into rust-lang:main Aug 10, 2026
14 checks passed
@rustbot rustbot added this to the 1.99.0 milestone Aug 10, 2026
rust-timer added a commit that referenced this pull request Aug 10, 2026
Rollup merge of #160791 - Walnut356:enum_recog, r=Kobzol

Use recognizer functions for enums and tuple structs

Non-urgent, but related to #160331

We currently shove most user defined types through `synthetic_lookup` as I hadn't gotten around to using type recognizers yet. If we want tests to skip outputting types when the type doesn't have a visualizer, we should also not attach a (useless) visualizer to most UDTs.

The only things `synthetic_lookup` catches that aren't already caught by the regexes are tuple-structs and sum-type enums. This patch adds targeted type recognizers for those, and no longer sends types through `synthetic_lookup` at all on LLDB 19+

this doesn't affect `pretty-std.rs` since all those types have visualizers, but it will affect other tests if/when they're converted (e.g. `tests/debuginfo/struct-in-struct.rs`)

r? @Kobzol, @jieyouxu
github-actions Bot pushed a commit to rust-lang/rustc-dev-guide that referenced this pull request Aug 11, 2026
…uwer

Rollup of 9 pull requests

Successful merges:

 - rust-lang/rust#158404 (trait_solver: normalize next-gen region constraints)
 - rust-lang/rust#160631 (Do not eagerly download rustfmt in bootstrap)
 - rust-lang/rust#160642 (mir: prohibit projection into scalable vec)
 - rust-lang/rust#160749 (MaybeDangling: ensure references fit inside the address space)
 - rust-lang/rust#160791 (Use recognizer functions for enums and tuple structs)
 - rust-lang/rust#160500 (Fix inaccurate description for crate and pathroot)
 - rust-lang/rust#160590 (Docs & bors: Replace mentions of libs-api with libs)
 - rust-lang/rust#160825 (Fix references to unsupported on sys::paths::unix)
 - rust-lang/rust#160852 (Use `remove_dir_all` for `./x clean`)

Failed merges:

 - rust-lang/rust#160829 (bootstrap: Make `main.rs` a stub that calls into the library crate)
bjorn3 pushed a commit to bjorn3/stdarch that referenced this pull request Aug 13, 2026
…uwer

Rollup of 9 pull requests

Successful merges:

 - rust-lang/rust#158404 (trait_solver: normalize next-gen region constraints)
 - rust-lang/rust#160631 (Do not eagerly download rustfmt in bootstrap)
 - rust-lang/rust#160642 (mir: prohibit projection into scalable vec)
 - rust-lang/rust#160749 (MaybeDangling: ensure references fit inside the address space)
 - rust-lang/rust#160791 (Use recognizer functions for enums and tuple structs)
 - rust-lang/rust#160500 (Fix inaccurate description for crate and pathroot)
 - rust-lang/rust#160590 (Docs & bors: Replace mentions of libs-api with libs)
 - rust-lang/rust#160825 (Fix references to unsupported on sys::paths::unix)
 - rust-lang/rust#160852 (Use `remove_dir_all` for `./x clean`)

Failed merges:

 - rust-lang/rust#160829 (bootstrap: Make `main.rs` a stub that calls into the library crate)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants