summary refs log tree commit diff
path: root/src/test/compile-fail/multiple-main-2.rs
diff options
context:
space:
mode:
authorILyoan <ilyoan@gmail.com>2013-01-11 18:08:01 +0900
committerBrian Anderson <banderson@mozilla.com>2013-01-14 13:58:13 -0800
commitb7cefd0c962e8ad8a77de45ede39d615d0f78924 (patch)
tree298487862da34c93e52d312447e777b843faef16 /src/test/compile-fail/multiple-main-2.rs
parent0e8490757fb9dc55f521f9cfb0fd4fb05b0f6bf6 (diff)
downloadrust-b7cefd0c962e8ad8a77de45ede39d615d0f78924.tar.gz
rust-b7cefd0c962e8ad8a77de45ede39d615d0f78924.zip
allowing the entry point name to be something other than main
add build tests
Diffstat (limited to 'src/test/compile-fail/multiple-main-2.rs')
-rw-r--r--src/test/compile-fail/multiple-main-2.rs17
1 files changed, 17 insertions, 0 deletions
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 <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.
+
+#[main]
+fn bar() {
+}
+
+#[main]
+fn foo() { //~ ERROR multiple 'main' functions
+}