From 0e55c04940dc42acbe1cc4c9e75ef21e7a40ee58 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Sat, 18 Jun 2016 18:29:52 -0400 Subject: [PATCH] Add test case for #30276 Make sure that treating a DST tuple constructor as a function doesn't ICE. Closes #30276 --- src/test/run-pass/issue-30276.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/test/run-pass/issue-30276.rs diff --git a/src/test/run-pass/issue-30276.rs b/src/test/run-pass/issue-30276.rs new file mode 100644 index 0000000000000..5dd0cd8ba5313 --- /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 or the MIT license +// , 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; +}