From ef343645c6bc0cebc6c29d0086ff842764319fe5 Mon Sep 17 00:00:00 2001 From: Tamir Duberstein Date: Sun, 15 Mar 2015 13:30:37 -0700 Subject: [PATCH] Regression test for #20714 Closes #20714. --- src/test/compile-fail/issue-20714.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/test/compile-fail/issue-20714.rs diff --git a/src/test/compile-fail/issue-20714.rs b/src/test/compile-fail/issue-20714.rs new file mode 100644 index 00000000000..cb322f00723 --- /dev/null +++ b/src/test/compile-fail/issue-20714.rs @@ -0,0 +1,15 @@ +// 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 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +struct G; + +fn main() { + let g = G(); //~ ERROR: expected function, found `G` +}