fix latent issues on main

This commit is contained in:
Aria Beingessner 2023-03-28 14:57:19 -04:00
parent 64de78432a
commit 2b207b02bb
2 changed files with 5 additions and 4 deletions

View File

@ -78,8 +78,9 @@ impl Report {
/// The boxed type must be thread safe and 'static, so that the `Report` /// The boxed type must be thread safe and 'static, so that the `Report`
/// will be as well. /// will be as well.
/// ///
/// Boxed `Diagnostic`s don't implement `Diagnostic` themselves due to trait coherence issues. /// Boxed `Diagnostic`s don't implement `Diagnostic` themselves due to trait
/// This method allows you to create a `Report` from a boxed `Diagnostic`. /// coherence issues. This method allows you to create a `Report` from a
/// boxed `Diagnostic`.
#[cfg_attr(track_caller, track_caller)] #[cfg_attr(track_caller, track_caller)]
pub fn new_boxed(error: Box<dyn Diagnostic + Send + Sync + 'static>) -> Self { pub fn new_boxed(error: Box<dyn Diagnostic + Send + Sync + 'static>) -> Self {
Report::from_boxed(error) Report::from_boxed(error)

View File

@ -249,7 +249,7 @@
//! To construct your own simple adhoc error use the [miette!] macro: //! To construct your own simple adhoc error use the [miette!] macro:
//! ```rust //! ```rust
//! // my_app/lib/my_internal_file.rs //! // my_app/lib/my_internal_file.rs
//! use miette::{IntoDiagnostic, Result, WrapErr, miette}; //! use miette::{miette, IntoDiagnostic, Result, WrapErr};
//! use semver::Version; //! use semver::Version;
//! //!
//! pub fn some_tool() -> Result<Version> { //! pub fn some_tool() -> Result<Version> {
@ -572,7 +572,7 @@
//! //!
//! Usage is like so: //! Usage is like so:
//! //!
//! ```rust //! ```rust,ignore
//! miette::set_hook(Box::new(|_| { //! miette::set_hook(Box::new(|_| {
//! Box::new( //! Box::new(
//! miette::MietteHandlerOpts::new() //! miette::MietteHandlerOpts::new()