Skip to content

Commit

Permalink
attributes: fix a few links in documentation
Browse files Browse the repository at this point in the history
Fixes: #2783
  • Loading branch information
kaffarell committed Nov 2, 2023
1 parent 62d57a6 commit 929bb66
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions tracing-attributes/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ mod expand;
/// By default, all arguments to the function are included as fields on the
/// span. Arguments that are `tracing` [primitive types] implementing the
/// [`Value` trait] will be recorded as fields of that type. Types which do
/// not implement `Value` will be recorded using [`std::fmt::Debug`].
/// not implement `Value` will be recorded using [`fmt::Debug`].
///
/// [primitive types]: https://docs.rs/tracing/latest/tracing/field/trait.Value.html#foreign-impls
/// [`Value` trait]: https://docs.rs/tracing/latest/tracing/field/trait.Value.html
Expand All @@ -104,7 +104,7 @@ mod expand;
/// not implement [`fmt::Debug`], or to exclude an argument with a verbose
/// or costly Debug implementation. Note that:
/// - multiple argument names can be passed to `skip`.
/// - arguments passed to `skip` do _not_ need to implement `fmt::Debug`.
/// - arguments passed to `skip` do _not_ need to implement [`fmt::Debug`].
///
/// Additional fields (key-value pairs with arbitrary data) can be passed to
/// to the generated span through the `fields` argument on the
Expand Down Expand Up @@ -247,8 +247,8 @@ mod expand;
/// **Note**: if the function returns a `Result<T, E>`, `ret` will record returned values if and
/// only if the function returns [`Result::Ok`].
///
/// By default, returned values will be recorded using their [`std::fmt::Debug`] implementations.
/// If a returned value implements [`std::fmt::Display`], it can be recorded using its `Display`
/// By default, returned values will be recorded using their [`fmt::Debug`] implementations.
/// If a returned value implements [`fmt::Display`], it can be recorded using its `Display`
/// implementation instead, by writing `ret(Display)`:
///
/// ```
Expand All @@ -259,7 +259,7 @@ mod expand;
/// }
/// ```
///
/// If the function returns a `Result<T, E>` and `E` implements `std::fmt::Display`, adding
/// If the function returns a `Result<T, E>` and `E` implements [`fmt::Display`], adding
/// `err` or `err(Display)` will emit error events when the function returns `Err`:
///
/// ```
Expand All @@ -283,8 +283,8 @@ mod expand;
/// }
/// ```
///
/// By default, error values will be recorded using their `std::fmt::Display` implementations.
/// If an error implements `std::fmt::Debug`, it can be recorded using its `Debug` implementation
/// By default, error values will be recorded using their [`fmt::Display`] implementations.
/// If an error implements [`fmt::Debug`], it can be recorded using its `Debug` implementation
/// instead by writing `err(Debug)`:
///
/// ```
Expand Down Expand Up @@ -356,6 +356,9 @@ mod expand;
/// [`follows_from`]: https://docs.rs/tracing/latest/tracing/struct.Span.html#method.follows_from
/// [`tracing`]: https://github.com/tokio-rs/tracing
/// [`fmt::Debug`]: std::fmt::Debug
/// [`fmt::Display`]: std::fmt::Display
/// [`Result::Ok`]: std::result::Result::Ok
/// [`Result::Err`]: std::result::Result::Err
/// [`Level`]: https://docs.rs/tracing/latest/tracing/struct.Level.html
/// [`Level::TRACE`]: https://docs.rs/tracing/latest/tracing/struct.Level.html#associatedconstant.TRACE
/// [`Level::ERROR`]: https://docs.rs/tracing/latest/tracing/struct.Level.html#associatedconstant.ERROR
Expand Down

0 comments on commit 929bb66

Please sign in to comment.