Provide an actual error when expanding macros to foreign items
This commit is contained in:
parent
13aa18891c
commit
9c8d0e375e
@ -4492,9 +4492,9 @@ impl Parser {
|
|||||||
self.span_err(view_item.span,
|
self.span_err(view_item.span,
|
||||||
"`use` and `extern mod` declarations must precede items");
|
"`use` and `extern mod` declarations must precede items");
|
||||||
}
|
}
|
||||||
iovi_item(_) => {
|
iovi_item(item) => {
|
||||||
// FIXME #5668: this will occur for a macro invocation:
|
// 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) => {
|
iovi_foreign_item(foreign_item) => {
|
||||||
foreign_items.push(foreign_item);
|
foreign_items.push(foreign_item);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user