Skip to content

Make Error::type_id() an inherent method on dyn Error#156252

Open
Jules-Bertholet wants to merge 1 commit intorust-lang:mainfrom
Jules-Bertholet:error-typeid-inherent
Open

Make Error::type_id() an inherent method on dyn Error#156252
Jules-Bertholet wants to merge 1 commit intorust-lang:mainfrom
Jules-Bertholet:error-typeid-inherent

Conversation

@Jules-Bertholet
Copy link
Copy Markdown
Contributor

@Jules-Bertholet Jules-Bertholet commented May 6, 2026

Resolves the soundness issues with this method, and ensures we don't rely on #57893 weirdness in a user-visible way.

Previously suggested by @seanmonstar: #60784 (comment)

Tracking issue: #60784

@rustbot label T-libs-api A-error-handling PG-error-handling

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels May 6, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented May 6, 2026

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @scottmcm, libs
  • @scottmcm, libs expanded to 8 candidates
  • Random selection from Mark-Simulacrum, jhpratt, nia-e, scottmcm

@rustbot rustbot added A-error-handling Area: Error handling PG-error-handling Project group: Error handling (https://github.com/rust-lang/project-error-handling) T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. labels May 6, 2026
@rustbot

This comment has been minimized.

Resolves the soundness issues with this method,
and ensures we don't rely on trait object method
resolution weirdness in a user-visible way.
@Jules-Bertholet Jules-Bertholet force-pushed the error-typeid-inherent branch from c08d3cc to 3f6f5e0 Compare May 6, 2026 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-error-handling Area: Error handling PG-error-handling Project group: Error handling (https://github.com/rust-lang/project-error-handling) S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants