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:
parent
fc45382c12
commit
24160171e4
21 changed files with 176 additions and 93 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue