about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorJeffrey Seyfried <jeffrey.seyfried@gmail.com>2016-12-23 02:16:31 +0000
committerJeffrey Seyfried <jeffrey.seyfried@gmail.com>2016-12-23 02:16:31 +0000
commit31d9cc3833a30b0cd4c1554102402af68eebeeef (patch)
treeb9633742dac484d7cbadb4366ed80e82fa5d355b /src/test
parentc217ab6c8dc1a305304b00a414be5f39ea6a2c81 (diff)
downloadrust-31d9cc3833a30b0cd4c1554102402af68eebeeef.tar.gz
rust-31d9cc3833a30b0cd4c1554102402af68eebeeef.zip
Fix import resolution bug and fold all idents in the AST.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/run-pass/issue-38556.rs22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/test/run-pass/issue-38556.rs b/src/test/run-pass/issue-38556.rs
new file mode 100644
index 00000000000..f6f334f650b
--- /dev/null
+++ b/src/test/run-pass/issue-38556.rs
@@ -0,0 +1,22 @@
+// 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.
+
+pub struct Foo;
+
+macro_rules! reexport {
+    () => { use Foo as Bar; }
+}
+
+reexport!();
+
+fn main() {
+    use Bar;
+    fn f(_: Bar) {}
+}