Skip to content

Make proc_macro::ConversionErrorKind non exhaustive#157935

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
GuillaumeGomez:ConversionErrorKind-non-exhaustive
Jun 18, 2026
Merged

Make proc_macro::ConversionErrorKind non exhaustive#157935
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
GuillaumeGomez:ConversionErrorKind-non-exhaustive

Conversation

@GuillaumeGomez

Copy link
Copy Markdown
Member

Needed for #151973.

r? @traviscross

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

Copy link
Copy Markdown
Contributor

Looks good to me. @Mark-Simulacrum, include me in the r=.

r? @Mark-Simulacrum

@Mark-Simulacrum Mark-Simulacrum left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also r=me since this is just unstable area right now, but we should agree on how non_exhaustive we want to be.

View changes since this review

#[non_exhaustive]
pub enum ConversionErrorKind {
/// The literal failed to be escaped, take a look at [`EscapeError`] for more information.
FailedToUnescape(EscapeError),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want a #[non_exhaustive] on the variant as well? I guess it's probable that we'd extend EscapeError instead? (Though EscapeError is also guaranteeing that its variants won't gain fields...)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EscapeError is already non_exhaustive. ;)

@GuillaumeGomez

Copy link
Copy Markdown
Member Author

@bors r=traviscross,Mark-Simulacrum rollup

@rust-bors

rust-bors Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

📌 Commit c3fc863 has been approved by traviscross,Mark-Simulacrum

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 Jun 18, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jun 18, 2026
…-non-exhaustive, r=traviscross,Mark-Simulacrum

Make `proc_macro::ConversionErrorKind` non exhaustive

Needed for rust-lang#151973.

r? @traviscross
rust-bors Bot pushed a commit that referenced this pull request Jun 18, 2026
…uwer

Rollup of 5 pull requests

Successful merges:

 - #157935 (Make `proc_macro::ConversionErrorKind` non exhaustive)
 - #158002 (Replace `unwrap` with `expect` in `get_module_children`)
 - #158071 (Update actions/checkout action to v6)
 - #158072 (Bump thin-vec to 0.2.18 to address RUSTSEC-2026-0103)
 - #158077 (rustdoc-json-types: Replace bincode dev-dependency with postcard)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jun 18, 2026
…-non-exhaustive, r=traviscross,Mark-Simulacrum

Make `proc_macro::ConversionErrorKind` non exhaustive

Needed for rust-lang#151973.

r? @traviscross
rust-bors Bot pushed a commit that referenced this pull request Jun 18, 2026
…uwer

Rollup of 10 pull requests

Successful merges:

 - #158026 (`RegionValues`: disable unnecessary range check)
 - #156795 (Handle generic reborrow in expression-use adjustment walking)
 - #157694 (Enhance documentation on wake call memory ordering)
 - #157935 (Make `proc_macro::ConversionErrorKind` non exhaustive)
 - #158002 (Replace `unwrap` with `expect` in `get_module_children`)
 - #158034 (Fix reborrow source expression visits)
 - #158072 (Bump thin-vec to 0.2.18 to address RUSTSEC-2026-0103)
 - #158074 (Document transient connection errors from TcpListener::accept)
 - #158077 (rustdoc-json-types: Replace bincode dev-dependency with postcard)
 - #158086 (renovate: Loosen dashboard approval and adopt recommended config)
rust-bors Bot pushed a commit that referenced this pull request Jun 18, 2026
…uwer

Rollup of 10 pull requests

Successful merges:

 - #158026 (`RegionValues`: disable unnecessary range check)
 - #156795 (Handle generic reborrow in expression-use adjustment walking)
 - #157694 (Enhance documentation on wake call memory ordering)
 - #157935 (Make `proc_macro::ConversionErrorKind` non exhaustive)
 - #158002 (Replace `unwrap` with `expect` in `get_module_children`)
 - #158034 (Fix reborrow source expression visits)
 - #158072 (Bump thin-vec to 0.2.18 to address RUSTSEC-2026-0103)
 - #158074 (Document transient connection errors from TcpListener::accept)
 - #158077 (rustdoc-json-types: Replace bincode dev-dependency with postcard)
 - #158086 (renovate: Loosen dashboard approval and adopt recommended config)
rust-bors Bot pushed a commit that referenced this pull request Jun 18, 2026
Rollup of 12 pull requests

Successful merges:

 - #156795 (Handle generic reborrow in expression-use adjustment walking)
 - #157694 (Enhance documentation on wake call memory ordering)
 - #157935 (Make `proc_macro::ConversionErrorKind` non exhaustive)
 - #158002 (Replace `unwrap` with `expect` in `get_module_children`)
 - #158009 (Reject `impl const Trait` since the right syntax is `const impl Trait` now)
 - #158034 (Fix reborrow source expression visits)
 - #158072 (Bump thin-vec to 0.2.18 to address RUSTSEC-2026-0103)
 - #158074 (Document transient connection errors from TcpListener::accept)
 - #158077 (rustdoc-json-types: Replace bincode dev-dependency with postcard)
 - #158086 (renovate: Loosen dashboard approval and adopt recommended config)
 - #158088 (codegen_ssa: no dbginfo for scalable vec local w/ `-O0`)
 - #158089 (Fix invalid "jump-to-def" doc link generation when an item has a `derive` proc-macro)
@rust-bors rust-bors Bot merged commit 97e7f77 into rust-lang:main Jun 18, 2026
13 checks passed
@rustbot rustbot added this to the 1.98.0 milestone Jun 18, 2026
rust-timer added a commit that referenced this pull request Jun 18, 2026
Rollup merge of #157935 - GuillaumeGomez:ConversionErrorKind-non-exhaustive, r=traviscross,Mark-Simulacrum

Make `proc_macro::ConversionErrorKind` non exhaustive

Needed for #151973.

r? @traviscross
github-actions Bot pushed a commit to rust-lang/stdarch that referenced this pull request Jun 19, 2026
Rollup of 12 pull requests

Successful merges:

 - rust-lang/rust#156795 (Handle generic reborrow in expression-use adjustment walking)
 - rust-lang/rust#157694 (Enhance documentation on wake call memory ordering)
 - rust-lang/rust#157935 (Make `proc_macro::ConversionErrorKind` non exhaustive)
 - rust-lang/rust#158002 (Replace `unwrap` with `expect` in `get_module_children`)
 - rust-lang/rust#158009 (Reject `impl const Trait` since the right syntax is `const impl Trait` now)
 - rust-lang/rust#158034 (Fix reborrow source expression visits)
 - rust-lang/rust#158072 (Bump thin-vec to 0.2.18 to address RUSTSEC-2026-0103)
 - rust-lang/rust#158074 (Document transient connection errors from TcpListener::accept)
 - rust-lang/rust#158077 (rustdoc-json-types: Replace bincode dev-dependency with postcard)
 - rust-lang/rust#158086 (renovate: Loosen dashboard approval and adopt recommended config)
 - rust-lang/rust#158088 (codegen_ssa: no dbginfo for scalable vec local w/ `-O0`)
 - rust-lang/rust#158089 (Fix invalid "jump-to-def" doc link generation when an item has a `derive` proc-macro)
@GuillaumeGomez GuillaumeGomez deleted the ConversionErrorKind-non-exhaustive branch June 19, 2026 10:27
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.

4 participants