Improve error recovery for some built-in macros

This commit is contained in:
Vadim Petrochenkov
2018-12-30 00:56:55 +03:00
parent 007115746c
commit df4690ddf4
13 changed files with 74 additions and 47 deletions

View File

@@ -10,7 +10,7 @@ pub fn expand_compile_error<'cx>(cx: &'cx mut ExtCtxt,
tts: &[tokenstream::TokenTree])
-> Box<dyn base::MacResult + 'cx> {
let var = match get_single_str_from_tts(cx, sp, tts, "compile_error!") {
None => return DummyResult::expr(sp),
None => return DummyResult::any(sp),
Some(v) => v,
};