diff options
| author | Brian Anderson <[email protected]> | 2011-05-01 17:22:20 -0400 |
|---|---|---|
| committer | Brian Anderson <[email protected]> | 2011-05-01 17:22:20 -0400 |
| commit | a5ccead3fdb509109806cb5cb4865afd93a1b4fb (patch) | |
| tree | b3ea38a3f803a5544611531c20a7027a72053895 /src | |
| parent | Remove the search direction from resolve's fold environment (diff) | |
| download | rust-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.rs | 19 |
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(); +} |