From b7cefd0c962e8ad8a77de45ede39d615d0f78924 Mon Sep 17 00:00:00 2001 From: ILyoan Date: Fri, 11 Jan 2013 18:08:01 +0900 Subject: allowing the entry point name to be something other than main add build tests --- src/test/compile-fail/multiple-main-2.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/test/compile-fail/multiple-main-2.rs (limited to 'src/test/compile-fail/multiple-main-2.rs') diff --git a/src/test/compile-fail/multiple-main-2.rs b/src/test/compile-fail/multiple-main-2.rs new file mode 100644 index 00000000000..723aefb91cb --- /dev/null +++ b/src/test/compile-fail/multiple-main-2.rs @@ -0,0 +1,17 @@ +// Copyright 2012 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. + +#[main] +fn bar() { +} + +#[main] +fn foo() { //~ ERROR multiple 'main' functions +} -- cgit 1.4.1-3-g733a5