We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7c8ee71 commit a4421ccCopy full SHA for a4421cc
src/comp/front/parser.rs
@@ -955,6 +955,9 @@ fn parse_syntax_ext(&parser p) -> @ast::expr {
955
956
fn parse_syntax_ext_naked(&parser p, uint lo) -> @ast::expr {
957
auto pth = parse_path(p);
958
+ if (vec::len(pth.node.idents) == 0u) {
959
+ p.fatal("expected a syntax expander name");
960
+ }
961
auto es = parse_seq(token::LPAREN, token::RPAREN,
962
some(token::COMMA), parse_expr, p);
963
auto hi = es.span.hi;
src/test/compile-fail/ext-noname.rs
@@ -0,0 +1,5 @@
1
+// error-pattern:expected a syntax expander name
2
+
3
+fn main() {
4
+ #();
5
+}
0 commit comments