about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2020-03-08 22:48:24 +0100
committerMazdak Farrokhzad <twingoow@gmail.com>2020-03-18 15:08:25 +0100
commita6cb04ff2303bcebf15583097ffb05e865eea7f4 (patch)
treeeded77eddc257f893418097c2fa520a38a670538
parent31ee8e0a4396898929702db7743988b6f9916fe1 (diff)
downloadrust-a6cb04ff2303bcebf15583097ffb05e865eea7f4.tar.gz
rust-a6cb04ff2303bcebf15583097ffb05e865eea7f4.zip
add test for stripped nested outline module
-rw-r--r--src/test/ui/parser/stripped-nested-outline-mod-pass.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/test/ui/parser/stripped-nested-outline-mod-pass.rs b/src/test/ui/parser/stripped-nested-outline-mod-pass.rs
new file mode 100644
index 00000000000..1b4669a439f
--- /dev/null
+++ b/src/test/ui/parser/stripped-nested-outline-mod-pass.rs
@@ -0,0 +1,13 @@
+// Expansion drives parsing, so conditional compilation will strip
+// out outline modules and we will never attempt parsing them.
+
+// check-pass
+
+fn main() {}
+
+#[cfg(FALSE)]
+mod foo {
+    mod bar {
+        mod baz; // This was an error before.
+    }
+}