From c4ce463f3709c7a8a92941d2e4bfab6db5da550f Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Tue, 16 Aug 2011 15:14:43 -0700 Subject: [PATCH] Add compile-fail tests for malformed glob imports --- src/test/compile-fail/import-glob-path.rs | 2 ++ src/test/compile-fail/import-glob-rename.rs | 10 ++++++++++ 2 files changed, 12 insertions(+) create mode 100644 src/test/compile-fail/import-glob-path.rs create mode 100644 src/test/compile-fail/import-glob-rename.rs diff --git a/src/test/compile-fail/import-glob-path.rs b/src/test/compile-fail/import-glob-path.rs new file mode 100644 index 00000000000..4a0c7582347 --- /dev/null +++ b/src/test/compile-fail/import-glob-path.rs @@ -0,0 +1,2 @@ +// error-pattern:cannot path into a glob +import foo::*::bar \ No newline at end of file diff --git a/src/test/compile-fail/import-glob-rename.rs b/src/test/compile-fail/import-glob-rename.rs new file mode 100644 index 00000000000..e02f3bc84ab --- /dev/null +++ b/src/test/compile-fail/import-glob-rename.rs @@ -0,0 +1,10 @@ +// error-pattern:globbed imports can't be renamed + +import baz = foo::*; + +mod foo { + fn bar() {} +} + +fn main() { +} \ No newline at end of file