/// Construct a new custom error.
Construct a new custom error.
Construct a new custom error .
pub(crate) fn new<S>(spanned: S, message: &'static str) -> Self
    where
        S: Spanned,
    {
        Self {
            span: spanned.span(),
            message,
        }
    }
pub ( crate ) fn new < S > ( spanned : S , message : & ' static str ) -> Self where S : Spanned , { Self { span : spanned . span ( ) , message , } }
Construct a new custom error.
Construct a new custom error .
spanned
S
message
&'static str