summaryrefslogtreecommitdiffstats
path: root/src/test/ui/conditional-compilation/cfg-empty-codemap.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/conditional-compilation/cfg-empty-codemap.rs')
-rw-r--r--src/test/ui/conditional-compilation/cfg-empty-codemap.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test/ui/conditional-compilation/cfg-empty-codemap.rs b/src/test/ui/conditional-compilation/cfg-empty-codemap.rs
new file mode 100644
index 000000000..9e34cacf7
--- /dev/null
+++ b/src/test/ui/conditional-compilation/cfg-empty-codemap.rs
@@ -0,0 +1,8 @@
+// Tests that empty source_maps don't ICE (#23301)
+
+// compile-flags: --cfg ""
+
+// error-pattern: invalid `--cfg` argument: `""` (expected `key` or `key="value"`)
+
+pub fn main() {
+}