From a5ccead3fdb509109806cb5cb4865afd93a1b4fb Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Sun, 1 May 2011 17:22:20 -0400 Subject: [PATCH] Add a test that imports can't circumvent exports --- src/test/compile-fail/export-import.rs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/test/compile-fail/export-import.rs diff --git a/src/test/compile-fail/export-import.rs b/src/test/compile-fail/export-import.rs new file mode 100644 index 0000000000000..cfa27af3aafcc --- /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(); +}