diff --git a/src/eyreish/error.rs b/src/eyreish/error.rs index 6b0dc34..677f368 100644 --- a/src/eyreish/error.rs +++ b/src/eyreish/error.rs @@ -30,9 +30,9 @@ impl Report { /// Create a new error object from a printable error message. /// - /// If the argument implements std::error::Error, prefer `Report::new` + /// If the argument implements [`std::error::Error`], prefer `Report::new` /// instead which preserves the underlying error's cause chain and - /// backtrace. If the argument may or may not implement std::error::Error + /// backtrace. If the argument may or may not implement [`std::error::Error`] /// now or in the future, use `miette!(err)` which handles either way /// correctly. /// @@ -206,7 +206,7 @@ impl Report { /// Create a new error from an error message to wrap the existing error. /// /// For attaching a higher level error message to a `Result` as it is - /// propagated, the [crate::WrapErr] extension trait may be more + /// propagated, the [`WrapErr`](crate::WrapErr) extension trait may be more /// convenient than this function. /// /// The primary reason to use `error.wrap_err(...)` instead of @@ -233,7 +233,7 @@ impl Report { unsafe { Report::construct(error, vtable, handler) } } - /// Compatibility re-export of wrap_err for interop with `anyhow` + /// Compatibility re-export of `wrap_err` for interop with `anyhow` pub fn context(self, msg: D) -> Self where D: Display + Send + Sync + 'static, diff --git a/src/handlers/theme.rs b/src/handlers/theme.rs index 1f5236a..aa6649e 100644 --- a/src/handlers/theme.rs +++ b/src/handlers/theme.rs @@ -55,9 +55,9 @@ impl GraphicalTheme { /// A "basic" graphical theme that skips colors and unicode characters and /// just does monochrome ascii art. If you want a completely non-graphical - /// rendering of your `Diagnostic`s, check out - /// [crate::NarratableReportHandler], or write your own - /// [crate::ReportHandler]! + /// rendering of your [`Diagnostic`](crate::Diagnostic)s, check out + /// [`NarratableReportHandler`](crate::NarratableReportHandler), or write + /// your own [`ReportHandler`](crate::ReportHandler) pub fn none() -> Self { Self { characters: ThemeCharacters::ascii(), @@ -79,7 +79,8 @@ impl Default for GraphicalTheme { } /** -Styles for various parts of graphical rendering for the [crate::GraphicalReportHandler]. +Styles for various parts of graphical rendering for the +[`GraphicalReportHandler`](crate::GraphicalReportHandler). */ #[derive(Debug, Clone)] pub struct ThemeStyles { @@ -159,7 +160,7 @@ impl ThemeStyles { // https://github.com/zesterer/ariadne/blob/e3cb394cb56ecda116a0a1caecd385a49e7f6662/src/draw.rs /// Characters to be used when drawing when using -/// [crate::GraphicalReportHandler]. +/// [`GraphicalReportHandler`](crate::GraphicalReportHandler). #[allow(missing_docs)] #[derive(Debug, Clone, Eq, PartialEq)] pub struct ThemeCharacters { diff --git a/src/protocol.rs b/src/protocol.rs index f516984..36c3539 100644 --- a/src/protocol.rs +++ b/src/protocol.rs @@ -232,7 +232,7 @@ whole thing--meaning you should be able to support `SourceCode`s which are gigabytes or larger in size. */ pub trait SourceCode: Send + Sync { - /// Read the bytes for a specific span from this SourceCode, keeping a + /// Read the bytes for a specific span from this `SourceCode`, keeping a /// certain number of lines before and after the span as context. fn read_span<'a>( &'a self,