@@ -41,6 +41,13 @@ pub use spez as __spez;
4141/// The forms that take `value` use *autoref specialization* to keep the most details possible:
4242/// if given a [`StackError`] it uses [`AnyError::from_stack`], if given a std error, uses [`AnyError::from_std`],
4343/// if given a value that impls `Display` it uses [`AnyError::from_display`] - in this order.
44+ ///
45+ /// [`AnyError::context`]: crate::AnyError::context
46+ /// [`AnyError::from_display`]: crate::AnyError::from_display
47+ /// [`AnyError::from_stack`]: crate::AnyError::from_stack
48+ /// [`AnyError::from_std`]: crate::AnyError::from_std
49+ /// [`AnyError`]: crate::AnyError
50+ /// [`StackError`]: crate::StackError
4451#[ macro_export]
4552macro_rules! anyerr {
4653 ( $fmt: literal$( , $( $arg: expr) ,* $( , ) ?) ?) => {
@@ -92,6 +99,9 @@ macro_rules! ensure {
9299/// to `false`, the macro expands to returning an error result. The error will be constructed
93100/// by passing the remaining arguments after the expression to [`anyerr`]. See its docs for
94101/// supported forms.
102+ ///
103+ /// [`AnyError`]: crate::AnyError
104+ /// [`anyerr`]: crate::anyerr
95105#[ macro_export]
96106macro_rules! ensure_any {
97107 ( $cond: expr, $( $tt: tt) * ) => {
@@ -116,6 +126,9 @@ macro_rules! bail {
116126///
117127/// This macro accepts the same forms as [`anyerr`], but wraps the error into `Err` and
118128/// expands to returning the result from the current function.
129+ ///
130+ /// [`AnyError`]: crate::AnyError
131+ /// [`anyerr`]: crate::anyerr
119132#[ macro_export]
120133macro_rules! bail_any {
121134 ( $( $tt: tt) * ) => {
@@ -143,6 +156,8 @@ macro_rules! try_or {
143156///
144157/// If the result is the error variant, this will construct a new error with [`anyerr`]
145158/// from the result's error while providing additional context.
159+ ///
160+ /// [`anyerr`]: crate::anyerr
146161#[ macro_export]
147162macro_rules! try_or_any {
148163 ( $result: expr, $( $context: tt) * ) => {
0 commit comments