diff --git a/README.md b/README.md index eb6869c..bc905fd 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/src/lib.rs b/src/lib.rs index a79700a..8c68a4c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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; //! ``` //!