From a85a03c2b5147c58e10bc65d37d2144ba79f6ed5 Mon Sep 17 00:00:00 2001 From: Jake Goulding Date: Mon, 4 Dec 2023 12:56:24 -0500 Subject: [PATCH] Add aliases for `[snafu(foo)]` to the `Snafu` macro This allows a search for `backtrace` to resolve to the macro, hinting where it is documented. --- src/lib.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index af4f5be..e1c2b18 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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")]