syntax: Remove DummyResult::expn_only
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
use syntax::ast;
|
||||
use syntax::ext::base;
|
||||
use syntax::ext::base::{self, DummyResult};
|
||||
use syntax::symbol::Symbol;
|
||||
use syntax::tokenstream;
|
||||
|
||||
@@ -12,7 +12,7 @@ pub fn expand_syntax_ext(
|
||||
) -> Box<dyn base::MacResult + 'static> {
|
||||
let es = match base::get_exprs_from_tts(cx, sp, tts) {
|
||||
Some(e) => e,
|
||||
None => return base::DummyResult::expr(sp),
|
||||
None => return DummyResult::any(sp),
|
||||
};
|
||||
let mut accumulator = String::new();
|
||||
let mut missing_literal = vec![];
|
||||
@@ -55,9 +55,9 @@ pub fn expand_syntax_ext(
|
||||
let mut err = cx.struct_span_err(missing_literal, "expected a literal");
|
||||
err.note("only literals (like `\"foo\"`, `42` and `3.14`) can be passed to `concat!()`");
|
||||
err.emit();
|
||||
return base::DummyResult::expr(sp);
|
||||
return DummyResult::any(sp);
|
||||
} else if has_errors {
|
||||
return base::DummyResult::expr(sp);
|
||||
return DummyResult::any(sp);
|
||||
}
|
||||
let sp = sp.apply_mark(cx.current_expansion.id);
|
||||
base::MacEager::expr(cx.expr_str(sp, Symbol::intern(&accumulator)))
|
||||
|
||||
Reference in New Issue
Block a user