use structured errors
This commit is contained in:
parent
253a1cefd8
commit
95dc7efad0
70 changed files with 2033 additions and 1548 deletions
|
@ -117,11 +117,9 @@ pub fn expand_include<'cx>(cx: &'cx mut ExtCtxt, sp: Span, tts: &[ast::TokenTree
|
|||
while self.p.token != token::Eof {
|
||||
match panictry!(self.p.parse_item()) {
|
||||
Some(item) => ret.push(item),
|
||||
None => panic!(self.p.span_fatal(
|
||||
self.p.span,
|
||||
&format!("expected item, found `{}`",
|
||||
self.p.this_token_to_string())
|
||||
))
|
||||
None => panic!(self.p.diagnostic().span_fatal(self.p.span,
|
||||
&format!("expected item, found `{}`",
|
||||
self.p.this_token_to_string())))
|
||||
}
|
||||
}
|
||||
Some(ret)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue