about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNick Cameron <ncameron@mozilla.com>2015-07-03 12:54:05 +1200
committerNick Cameron <ncameron@mozilla.com>2015-07-21 21:55:19 +1200
commitbf34187a2f874690798b06d9350c1f6c4755243a (patch)
treef46a920d2c39b99415c0f5b28c428ec8c68aa112
parent0e907fa542d7bfa08ca1f55512ffa4a5ff70ed15 (diff)
downloadrust-bf34187a2f874690798b06d9350c1f6c4755243a.tar.gz
rust-bf34187a2f874690798b06d9350c1f6c4755243a.zip
Test
-rw-r--r--src/test/compile-fail/cfg-empty-codemap.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/test/compile-fail/cfg-empty-codemap.rs b/src/test/compile-fail/cfg-empty-codemap.rs
new file mode 100644
index 00000000000..4c27d57008d
--- /dev/null
+++ b/src/test/compile-fail/cfg-empty-codemap.rs
@@ -0,0 +1,18 @@
+// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// Tests that empty codemaps don't ICE (#23301)
+
+// compile-flags: --cfg ""
+
+// error-pattern: expected ident, found
+
+pub fn main() {
+}