about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorJeffrey Seyfried <jeffrey.seyfried@gmail.com>2016-12-07 00:28:51 +0000
committerJeffrey Seyfried <jeffrey.seyfried@gmail.com>2016-12-07 10:56:55 +0000
commitfd98a8d795b17b76ea6d1edcae55d4450efd466f (patch)
treeae51c9d40290d78d68ab07675747205eacfd8768 /src/test
parentdaf8c1dfce3b448fc581cc319f64632ec22bd0e1 (diff)
downloadrust-fd98a8d795b17b76ea6d1edcae55d4450efd466f.tar.gz
rust-fd98a8d795b17b76ea6d1edcae55d4450efd466f.zip
macros: fix the expected paths for a non-inline module matched by an `item` fragment.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/run-pass/auxiliary/issue_38190.rs12
-rw-r--r--src/test/run-pass/issue-38190.rs21
2 files changed, 33 insertions, 0 deletions
diff --git a/src/test/run-pass/auxiliary/issue_38190.rs b/src/test/run-pass/auxiliary/issue_38190.rs
new file mode 100644
index 00000000000..7fc4390d6dc
--- /dev/null
+++ b/src/test/run-pass/auxiliary/issue_38190.rs
@@ -0,0 +1,12 @@
+// Copyright 2016 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.
+
+#[macro_export]
+macro_rules! m { ([$i:item]) => {} }
diff --git a/src/test/run-pass/issue-38190.rs b/src/test/run-pass/issue-38190.rs
new file mode 100644
index 00000000000..ed9bf9e8095
--- /dev/null
+++ b/src/test/run-pass/issue-38190.rs
@@ -0,0 +1,21 @@
+// Copyright 2016 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.
+
+// aux-build:issue_38190.rs
+// ignore-pretty issue #37195
+
+#[macro_use]
+extern crate issue_38190;
+
+mod auxiliary {
+    m!([mod issue_38190;]);
+}
+
+fn main() {}