mirror of https://github.com/zkat/miette.git
fix(tests): add Display impl to diagnostic_source example
This commit is contained in:
parent
f7b453fd4a
commit
0a4cf4ad24
|
|
@ -385,7 +385,6 @@ pub struct MyErrorType {
|
|||
|
||||
[`miette!`]: https://docs.rs/miette/latest/miette/macro.miette.html
|
||||
[`std::error::Error`]: https://doc.rust-lang.org/nightly/std/error/trait.Error.html
|
||||
[`std::error::Error::source`]: https://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.source
|
||||
[`Diagnostic`]: https://docs.rs/miette/latest/miette/struct.Diagnostic.html
|
||||
[`IntoDiagnostic`]: https://docs.rs/miette/latest/miette/trait.IntoDiagnostic.html
|
||||
[`MietteHandlerOpts`]: https://docs.rs/miette/latest/miette/struct.MietteHandlerOpts.html
|
||||
|
|
|
|||
|
|
@ -539,6 +539,7 @@
|
|||
//! use thiserror::Error;
|
||||
//!
|
||||
//! #[derive(Debug, Diagnostic, Error)]
|
||||
//! #[error("MyError")]
|
||||
//! struct MyError {
|
||||
//! #[source]
|
||||
//! #[diagnostic_source]
|
||||
|
|
@ -546,6 +547,7 @@
|
|||
//! }
|
||||
//!
|
||||
//! #[derive(Debug, Diagnostic, Error)]
|
||||
//! #[error("OtherError")]
|
||||
//! struct OtherError;
|
||||
//! ```
|
||||
//!
|
||||
|
|
|
|||
Loading…
Reference in New Issue