Skip to content

Commit

Permalink
error-stack: clarify documentation of HookContext (#1987)
Browse files Browse the repository at this point in the history
## 馃専 What is the purpose of this PR?

#1693 separated `fmt::HookContext` into `hook::HookContext` and `fmt::HookContext`, so that it can be used in #1558. While working, the problem is that documentation doesn't render correctly because `hook::HookContext` is private in public. Therefore unreachable rustdoc is unable to navigate to the type, and the documentation is incomplete.

This PR moves to a macro-based approach to enable better documentation. Instead of using an unreachable public type, we have a macro that implements the necessary common functions. This is by far not ideal, but I found this to be the best way without compromising #1558 or future hooks.
  • Loading branch information
indietyp committed Jan 31, 2023
1 parent 57e6d32 commit 61a1610
Show file tree
Hide file tree
Showing 6 changed files with 230 additions and 244 deletions.

0 comments on commit 61a1610

Please sign in to comment.