Skip to content

Commit

Permalink
docs: dogfood url(docsrs)
Browse files Browse the repository at this point in the history
  • Loading branch information
zkat committed Aug 22, 2021
1 parent 7e76e2d commit 2d886c0
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,21 @@ pub enum MietteError {
/// Wrapper around [std::io::Error]. This is returned when something went
/// wrong while reading a [crate::Source].
#[error(transparent)]
#[diagnostic(code(miette::io_error))]
#[doc(alias = "miette::io_error")]
#[diagnostic(code(miette::io_error), url(docsrs))]
IoError(#[from] io::Error),

/// Returned when a [crate::SourceSpan] extends beyond the bounds of a given [crate::Source].
#[error("The given offset is outside the bounds of its Source")]
#[diagnostic(
code(miette::span_out_of_bounds),
help("Double-check your spans. Do you have an off-by-one error?")
help("Double-check your spans. Do you have an off-by-one error?"),
url(docsrs)
)]
#[doc(alias = "miette::span_out_of_bounds")]
OutOfBounds,

/// Returned when installing a [crate::DiagnosticReportPrinter] failed.
/// Typically, this will be because [crate::set_printer] was called twice.
#[error("Failed to install DiagnosticReportPrinter")]
#[diagnostic(code(miette::set_printer_failed))]
#[doc(alias = "miette::set_printer_failed")]
#[diagnostic(code(miette::set_printer_failed), url(docsrs))]
SetPrinterFailure,
}

0 comments on commit 2d886c0

Please sign in to comment.