[−][src]Function rustc_ap_rustc_expand::base::expr_to_spanned_string
pub fn expr_to_spanned_string<'a>(
cx: &'a mut ExtCtxt,
expr: P<Expr>,
err_msg: &str
) -> Result<(Symbol, StrStyle, Span), Option<DiagnosticBuilder<'a>>>
Extracts a string literal from the macro expanded version of expr
,
emitting err_msg
if expr
is not a string literal. This does not stop
compilation on error, merely emits a non-fatal error and returns None
.