Tweak macro parse errors when reaching EOF during macro call parse
- Add detail on origin of current parser when reaching EOF and stop saying "found <eof>" and point at the end of macro calls - Handle empty `cfg_attr` attribute - Reword empty `derive` attribute error
This commit is contained in:
@@ -138,7 +138,11 @@ fn parse_inline_asm<'a>(
|
||||
if p2.token != token::Eof {
|
||||
let mut extra_tts = p2.parse_all_token_trees()?;
|
||||
extra_tts.extend(tts[first_colon..].iter().cloned());
|
||||
p = parse::stream_to_parser(cx.parse_sess, extra_tts.into_iter().collect());
|
||||
p = parse::stream_to_parser(
|
||||
cx.parse_sess,
|
||||
extra_tts.into_iter().collect(),
|
||||
Some("inline assembly"),
|
||||
);
|
||||
}
|
||||
|
||||
asm = s;
|
||||
|
||||
Reference in New Issue
Block a user