diff --git a/src/test/compile-fail/multiple-main.rs b/src/test/compile-fail/multiple-main.rs new file mode 100644 index 00000000000..03e40167e88 --- /dev/null +++ b/src/test/compile-fail/multiple-main.rs @@ -0,0 +1,7 @@ +fn main() { +} + +mod foo { + fn main() { //~ ERROR multiple 'main' functions + } +} \ No newline at end of file