Skip to content

Simplify panic_context #19110

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 12, 2025
Merged

Simplify panic_context #19110

merged 1 commit into from
Feb 12, 2025

Conversation

eagr
Copy link
Contributor

@eagr eagr commented Feb 7, 2025

Housekeeping. PanicContext::init doesn't seem necessary.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 7, 2025
@eagr
Copy link
Contributor Author

eagr commented Feb 7, 2025

Came across this when browsing the codebase. Thought it'd nice to simplify it a bit. If you think this is not worth it, feel free to close :))

Bikeshed:

  • could also get rid of with_context: const CTX is evaluated at compile time anyways and initialized at the first with() call, maybe could place the thread_local! at mod level?
  • PanicContext -> ThreadContext?

@Veykril
Copy link
Member

Veykril commented Feb 12, 2025

Thanks!

@Veykril Veykril added this pull request to the merge queue Feb 12, 2025
Merged via the queue into rust-lang:master with commit aa64a6d Feb 12, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants