diff options
| author | bors <bors@rust-lang.org> | 2013-06-06 16:52:36 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-06-06 16:52:36 -0700 |
| commit | d6b4fde97e71e54a85f0e1b1e66bca7a50111deb (patch) | |
| tree | 3a046cc50a2413588648e23f5e8dabb336d6a89a /src/libsyntax/parse | |
| parent | 6a09b6f0c325dcef72fd623b89064df868c96412 (diff) | |
| parent | 9c8d0e375e36e091e87dbd2bdf6022562bdb41c4 (diff) | |
| download | rust-d6b4fde97e71e54a85f0e1b1e66bca7a50111deb.tar.gz rust-d6b4fde97e71e54a85f0e1b1e66bca7a50111deb.zip | |
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`
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 300e5adcf92..8ebb7de0bfe 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -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); |
