pub fn expr_to_spanned_string<'a>( cx: &'a mut ExtCtxt<'_>, expr: P<Expr>, err_msg: &'static str ) -> Result<(Symbol, StrStyle, Span), Option<(DiagnosticBuilder<'a, ErrorGuaranteed>, bool)>>
Extracts a string literal from the macro expanded version of
returning a diagnostic error of
expr is not a string literal.
The returned bool indicates whether an applicable suggestion has already been
added to the diagnostic to avoid emitting multiple suggestions.
indicates that an ast error was encountered.