Function syntax::ext::base::expr_to_str[src]

pub fn expr_to_str(cx: &mut ExtCtxt, expr: Gc<Expr>, err_msg: &str) -> Option<(InternedString, StrStyle)>

Extract 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.