mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 11:07:42 +00:00
Merge pull request #910 from kamalmarhubi/cancel-errors
macros: Cancel DiagnosticBuilder when not emitting error
This commit is contained in:
commit
6cec513c67
@ -82,7 +82,10 @@ pub fn rewrite_macro(mac: &ast::Mac,
|
||||
loop {
|
||||
expr_vec.push(match parser.parse_expr() {
|
||||
Ok(expr) => expr,
|
||||
Err(..) => return None,
|
||||
Err(mut e) => {
|
||||
e.cancel();
|
||||
return None;
|
||||
}
|
||||
});
|
||||
|
||||
match parser.token {
|
||||
|
Loading…
Reference in New Issue
Block a user