MakeError

Trait MakeError 

Source
pub trait MakeError {
    // Required method
    fn error<M: Display>(&self, m: M) -> Error;
}
Expand description

Provides .error() on impl Spanned and [ErrorLoc]

Required Methods§

Source

fn error<M: Display>(&self, m: M) -> Error

Convenience method to make an error

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl MakeError for [(Span, &'_ str)]

Generates multiple copies of the error, for multiple places

§Panics

Panics if passed an empty slice.

Source§

fn error<M: Display>(&self, m: M) -> Error

Implementors§

Source§

impl<T: Spanned> MakeError for T