aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrian Anderson <[email protected]>2011-05-01 17:22:20 -0400
committerBrian Anderson <[email protected]>2011-05-01 17:22:20 -0400
commita5ccead3fdb509109806cb5cb4865afd93a1b4fb (patch)
treeb3ea38a3f803a5544611531c20a7027a72053895 /src
parentRemove the search direction from resolve's fold environment (diff)
downloadrust-a5ccead3fdb509109806cb5cb4865afd93a1b4fb.tar.xz
rust-a5ccead3fdb509109806cb5cb4865afd93a1b4fb.zip
Add a test that imports can't circumvent exports
Diffstat (limited to 'src')
-rw-r--r--src/test/compile-fail/export-import.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/test/compile-fail/export-import.rs b/src/test/compile-fail/export-import.rs
new file mode 100644
index 00000000..cfa27af3
--- /dev/null
+++ b/src/test/compile-fail/export-import.rs
@@ -0,0 +1,19 @@
+// xfail-boot
+// error-pattern: unresolved name
+
+import m.unexported;
+
+mod m {
+ export exported;
+
+ fn exported() {
+ }
+
+ fn unexported() {
+ }
+}
+
+
+fn main() {
+ unexported();
+}