Skip to content

Commit

Permalink
Add aliases for [snafu(foo)] to the Snafu macro
Browse files Browse the repository at this point in the history
This allows a search for `backtrace` to resolve to the macro, hinting
where it is documented.
  • Loading branch information
shepmaster committed Dec 4, 2023
1 parent 0bab0e4 commit a85a03c
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,19 @@ pub use report::CleanedErrorText;
pub use report::{Report, __InternalExtractErrorType};

#[doc = include_str!("Snafu.md")]
#[doc(alias(
"backtrace",
"context",
"crate_root",
"display",
"implicit",
"module",
"provide",
"source",
"transparent",
"visibility",
"whatever",
))]
pub use snafu_derive::Snafu;

#[doc = include_str!("report.md")]
Expand Down

0 comments on commit a85a03c

Please sign in to comment.