about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-01-06 15:38:10 -0800
committerAlex Crichton <alex@alexcrichton.com>2015-01-06 15:38:10 -0800
commit0631b466c23ffdb1edb2997a8da2702cfe6fcd4a (patch)
tree3c9f6076565b544f450e98102825a85df1b55f3b /src/test
parent771fe9026a38cb673d0928fea1f6ebd4ba796e43 (diff)
parentd85c017f92156d0d6854292c976c13c3312bba8e (diff)
downloadrust-0631b466c23ffdb1edb2997a8da2702cfe6fcd4a.tar.gz
rust-0631b466c23ffdb1edb2997a8da2702cfe6fcd4a.zip
rollup merge of #19430: pczarn/interp_tt-cleanup
Conflicts:
	src/libsyntax/parse/parser.rs
Diffstat (limited to 'src/test')
-rw-r--r--src/test/compile-fail/issue-6596-1.rs (renamed from src/test/compile-fail/issue-6596.rs)2
-rw-r--r--src/test/compile-fail/issue-6596-2.rs23
-rw-r--r--src/test/run-pass-fulldeps/issue-18763-quote-token-tree.rs1
3 files changed, 25 insertions, 1 deletions
diff --git a/src/test/compile-fail/issue-6596.rs b/src/test/compile-fail/issue-6596-1.rs
index c5be0da5f4b..e988f404c3c 100644
--- a/src/test/compile-fail/issue-6596.rs
+++ b/src/test/compile-fail/issue-6596-1.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// error-pattern: unexpected token
+// error-pattern: unknown macro variable `nonexistent`
 
 macro_rules! e {
     ($inp:ident) => (
diff --git a/src/test/compile-fail/issue-6596-2.rs b/src/test/compile-fail/issue-6596-2.rs
new file mode 100644
index 00000000000..0158ad4ba4e
--- /dev/null
+++ b/src/test/compile-fail/issue-6596-2.rs
@@ -0,0 +1,23 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#![feature(macro_rules)]
+
+// error-pattern: unknown macro variable `nonexistent`
+
+macro_rules! g {
+    ($inp:ident) => (
+        { $inp $nonexistent }
+    );
+}
+
+fn main() {
+    g!(foo);
+}
diff --git a/src/test/run-pass-fulldeps/issue-18763-quote-token-tree.rs b/src/test/run-pass-fulldeps/issue-18763-quote-token-tree.rs
index 23228d49995..aeb6a89a98e 100644
--- a/src/test/run-pass-fulldeps/issue-18763-quote-token-tree.rs
+++ b/src/test/run-pass-fulldeps/issue-18763-quote-token-tree.rs
@@ -21,6 +21,7 @@ fn syntax_extension(cx: &ExtCtxt) {
     let _toks_1 = vec![quote_tokens!(cx, /** comment */ fn foo() {})];
     let name = quote_tokens!(cx, bar);
     let _toks_2 = vec![quote_item!(cx, static $name:int = 2;)];
+    let _toks_4 = quote_tokens!(cx, $name:static $name:sizeof);
     let _toks_3 = vec![quote_item!(cx,
         /// comment
         fn foo() { let $name:int = 3; }