maud-extensions-macros 0.6.7

Proc-macro implementation for maud-extensions.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// Shared compile-time diagnostic formatting helpers.
use proc_macro2::Span;
use syn::Error;

pub(crate) fn error_with_help(
    span: Span,
    summary: impl AsRef<str>,
    help: impl AsRef<str>,
) -> Error {
    Error::new(
        span,
        format!("{}\nhelp: {}", summary.as_ref(), help.as_ref()),
    )
}