about summary refs log tree commit diff
path: root/src/test/compile-fail
diff options
context:
space:
mode:
authorkennytm <kennytm@gmail.com>2018-03-16 01:49:38 +0800
committerGitHub <noreply@github.com>2018-03-16 01:49:38 +0800
commita45b79ddb7e8d65c12d5b8f2e46ac22698bd134e (patch)
treead28c105929e8eaa25c72ce7cf55feb4f228d9fd /src/test/compile-fail
parentff2d506c2c748bd218f74c6014abc4cecc8c74c4 (diff)
parent525727529492f30ef9d68467d5b8a7f18f65d743 (diff)
downloadrust-a45b79ddb7e8d65c12d5b8f2e46ac22698bd134e.tar.gz
rust-a45b79ddb7e8d65c12d5b8f2e46ac22698bd134e.zip
Rollup merge of #48706 - ehuss:main-not-found-in-crate, r=estebank
Add crate name to "main function not found" error message.

Fixes #44798 and rust-lang/cargo#4948.

I was wondering if it might be cleaner to update the ui tests to add a simple `fn main() {}` for the unrelated tests.  Let me know if you would prefer that.
Diffstat (limited to 'src/test/compile-fail')
-rw-r--r--src/test/compile-fail/cfg-attr-cfg-2.rs2
-rw-r--r--src/test/compile-fail/cfg-in-crate-1.rs2
-rw-r--r--src/test/compile-fail/elided-test.rs2
-rw-r--r--src/test/compile-fail/missing-main.rs2
4 files changed, 4 insertions, 4 deletions
diff --git a/src/test/compile-fail/cfg-attr-cfg-2.rs b/src/test/compile-fail/cfg-attr-cfg-2.rs
index b71a3be5dce..58a62d45ea5 100644
--- a/src/test/compile-fail/cfg-attr-cfg-2.rs
+++ b/src/test/compile-fail/cfg-attr-cfg-2.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 //
-// error-pattern: main function not found
+// error-pattern: `main` function not found
 // compile-flags: --cfg foo
 
 // main is conditionally compiled, but the conditional compilation
diff --git a/src/test/compile-fail/cfg-in-crate-1.rs b/src/test/compile-fail/cfg-in-crate-1.rs
index 94ae8d89b4f..bbccf2bcd0f 100644
--- a/src/test/compile-fail/cfg-in-crate-1.rs
+++ b/src/test/compile-fail/cfg-in-crate-1.rs
@@ -8,6 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// error-pattern:main function not found
+// error-pattern: `main` function not found
 
 #![cfg(bar)]
diff --git a/src/test/compile-fail/elided-test.rs b/src/test/compile-fail/elided-test.rs
index b62214b12f9..0cdd0010a74 100644
--- a/src/test/compile-fail/elided-test.rs
+++ b/src/test/compile-fail/elided-test.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// error-pattern: main function not found
+// error-pattern: `main` function not found
 
 // Since we're not compiling a test runner this function should be elided
 // and the build will fail because main doesn't exist
diff --git a/src/test/compile-fail/missing-main.rs b/src/test/compile-fail/missing-main.rs
index 4bfdaf69480..2788a5c2d58 100644
--- a/src/test/compile-fail/missing-main.rs
+++ b/src/test/compile-fail/missing-main.rs
@@ -8,5 +8,5 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// error-pattern:main function not found
+// error-pattern: `main` function not found
 fn mian() { }