Skip to content

Commit

Permalink
auto merge of #6982 : Aatch/rust/better-foreign-error, r=pcwalton
Browse files Browse the repository at this point in the history
I encountered this. A straight fail is not useful and most people aren't going to happily spelunk in `parser.rs`
  • Loading branch information
bors committed Jun 6, 2013
2 parents 6a09b6f + 9c8d0e3 commit d6b4fde
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libsyntax/parse/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d6b4fde

Please sign in to comment.