about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorEduard-Mihai Burtescu <edy.burt@gmail.com>2016-06-06 06:48:32 +0300
committerEduard-Mihai Burtescu <edy.burt@gmail.com>2016-06-06 06:48:32 +0300
commit9f5be6c2a4606df50305849f3f4418042bfc3249 (patch)
treed90a811cbf1f4a229bef0f3fc9d0e19fbba7e027 /src
parentd2b8fb4803c1749c5abccbfee2632a9d210b543d (diff)
parentf6a243d231910a42822d4a287f6183698474022a (diff)
Rollup merge of #34052 - jonas-schievink:issue-32829, r=brson
Add regression test for issue #32829

Closes #32829
Diffstat (limited to 'src')
-rw-r--r--src/test/compile-fail/issue-32829.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/test/compile-fail/issue-32829.rs b/src/test/compile-fail/issue-32829.rs
new file mode 100644
index 00000000000..9ac70882ca2
--- /dev/null
+++ b/src/test/compile-fail/issue-32829.rs
@@ -0,0 +1,17 @@
+// Copyright 2016 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.
+
+// error-pattern: calls in statics are limited
+
+static S : u64 = { { panic!("foo"); 0 } };
+
+fn main() {
+    println!("{:?}", S);
+}