1
Fork 0

Do not capture stderr in the compiler. Instead just panic silently for fatal errors

This commit is contained in:
John Kåre Alsaker 2018-01-21 12:47:58 +01:00
parent 9fd7da904b
commit 9a8d6b8bb5
19 changed files with 90 additions and 97 deletions

View file

@ -116,9 +116,10 @@ pub fn expand_include<'cx>(cx: &'cx mut ExtCtxt, sp: Span, tts: &[tokenstream::T
while self.p.token != token::Eof {
match panictry!(self.p.parse_item()) {
Some(item) => ret.push(item),
None => panic!(self.p.diagnostic().span_fatal(self.p.span,
None => self.p.diagnostic().span_fatal(self.p.span,
&format!("expected item, found `{}`",
self.p.this_token_to_string())))
self.p.this_token_to_string()))
.raise()
}
}
Some(ret)