about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2011-06-15 14:00:27 -0700
committerBrian Anderson <banderson@mozilla.com>2011-06-15 16:01:39 -0700
commit14c5900a701bf5d08f9512cbac52a8bf7dc8f4ef (patch)
treee435362e319c2a0a391b28a5c88dcfc369f0f70c /src
parent2772a29e92764d1e930e205b328ad0be797ef6aa (diff)
downloadrust-14c5900a701bf5d08f9512cbac52a8bf7dc8f4ef.tar.gz
rust-14c5900a701bf5d08f9512cbac52a8bf7dc8f4ef.zip
test: Add a compile-fail test for attribute/syntax parsing
I don't currently know how to deal with syntax extensions that appear betweeen
an attribute and an item, so this test captures the error that occurs.

Issue #487
Diffstat (limited to 'src')
-rw-r--r--src/test/compile-fail/ext-after-attrib.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test/compile-fail/ext-after-attrib.rs b/src/test/compile-fail/ext-after-attrib.rs
new file mode 100644
index 00000000000..31786fcaf65
--- /dev/null
+++ b/src/test/compile-fail/ext-after-attrib.rs
@@ -0,0 +1,8 @@
+// xfail-stage0
+// error-pattern:expecting \[, found fmt
+
+// Don't know how to deal with a syntax extension appearing after an
+// item attribute. Probably could use a better error message.
+#[foo = "bar"]
+#fmt("baz")
+fn main() { }
\ No newline at end of file