summaryrefslogtreecommitdiffstats
path: root/src/test/ui/attributes/key-value-expansion-on-mac.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/test/ui/attributes/key-value-expansion-on-mac.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test/ui/attributes/key-value-expansion-on-mac.rs b/src/test/ui/attributes/key-value-expansion-on-mac.rs
new file mode 100644
index 000000000..c1d68d8cd
--- /dev/null
+++ b/src/test/ui/attributes/key-value-expansion-on-mac.rs
@@ -0,0 +1,14 @@
+#![feature(rustc_attrs)]
+
+#[rustc_dummy = stringify!(a)] // OK
+macro_rules! bar {
+ () => {};
+}
+
+// FIXME?: `bar` here expands before `stringify` has a chance to expand.
+// `#[rustc_dummy = ...]` is validated and dropped during expansion of `bar`,
+// the "unexpected expression" errors comes from the validation.
+#[rustc_dummy = stringify!(b)] //~ ERROR unexpected expression: `stringify!(b)`
+bar!();
+
+fn main() {}