about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSteven Allen <steven@stebalien.com>2016-06-18 18:29:52 -0400
committerSteven Allen <steven@stebalien.com>2016-06-18 18:29:52 -0400
commit0e55c04940dc42acbe1cc4c9e75ef21e7a40ee58 (patch)
tree77269676e5b85494a48cb05455ed751034fe1c1f
parent11d4708f3afc455b4d572d862f1e759442fc67f5 (diff)
downloadrust-0e55c04940dc42acbe1cc4c9e75ef21e7a40ee58.tar.gz
rust-0e55c04940dc42acbe1cc4c9e75ef21e7a40ee58.zip
Add test case for #30276
Make sure that treating a DST tuple constructor as a function doesn't ICE.

Closes #30276
-rw-r--r--src/test/run-pass/issue-30276.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test/run-pass/issue-30276.rs b/src/test/run-pass/issue-30276.rs
new file mode 100644
index 00000000000..5dd0cd8ba53
--- /dev/null
+++ b/src/test/run-pass/issue-30276.rs
@@ -0,0 +1,14 @@
+// Copyright 2013 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.
+
+struct Test([i32]);
+fn main() {
+    let _x: fn(_) -> Test = Test;
+}