about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-12-17 06:43:16 +0000
committerbors <bors@rust-lang.org>2016-12-17 06:43:16 +0000
commitf99d4dfef2cf3cbbf5699e44fddf019695e1d00d (patch)
tree260767f07070b84f1c19a19eae4c0adc682f9afa /src/test
parentd250169cb5a96481a3e7c8f9fe05de49f60e5ae5 (diff)
parentfd98a8d795b17b76ea6d1edcae55d4450efd466f (diff)
downloadrust-f99d4dfef2cf3cbbf5699e44fddf019695e1d00d.tar.gz
rust-f99d4dfef2cf3cbbf5699e44fddf019695e1d00d.zip
Auto merge of #38205 - jseyfried:fix_module_directory_regression, r=eddyb
macros: fix the expected paths for a non-inline module matched by an `item` fragment

Fixes #38190.
r? @nrc
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() {}