From eb4ea3423a1d8b8281b3643541ef3c3541afd004 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kat=20March=C3=A1n?= Date: Sun, 22 Aug 2021 00:22:38 -0700 Subject: [PATCH] docs: add error code aliases miette can't do this yet, but I can still do it by hand! --- src/error.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/error.rs b/src/error.rs index 6144a9d..a5f0ade 100644 --- a/src/error.rs +++ b/src/error.rs @@ -13,6 +13,7 @@ pub enum MietteError { /// wrong while reading a [crate::Source]. #[error(transparent)] #[diagnostic(code(miette::io_error))] + #[doc(alias = "miette::io_error")] IoError(#[from] io::Error), /// Returned when a [crate::SourceSpan] extends beyond the bounds of a given [crate::Source]. @@ -21,11 +22,13 @@ pub enum MietteError { code(miette::span_out_of_bounds), help("Double-check your spans. Do you have an off-by-one error?") )] + #[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")] SetPrinterFailure, }