auto merge of #6982 : Aatch/rust/better-foreign-error, r=pcwalton

I encountered this. A straight fail is not useful and most people aren't going to happily spelunk in `parser.rs`
This commit is contained in:
bors 2013-06-06 16:52:36 -07:00
commit d6b4fde97e
1 changed files with 2 additions and 2 deletions

View File

@ -4503,9 +4503,9 @@ impl Parser {
self.span_err(view_item.span,
"`use` and `extern mod` declarations must precede items");
}
iovi_item(_) => {
iovi_item(item) => {
// FIXME #5668: this will occur for a macro invocation:
fail!();
self.span_fatal(item.span, "macros cannot expand to foreign items");
}
iovi_foreign_item(foreign_item) => {
foreign_items.push(foreign_item);