]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/parser/issue-2354.rs
Provide a span if main function is not present in crate
[rust.git] / src / test / ui / parser / issue-2354.rs
index 565f84822f7d6139a336dfbf1d01c5d630d43f47..a14eb6e32fc91cf9db73893d784fafc43fe3fd23 100644 (file)
@@ -1,4 +1,7 @@
 fn foo() { //~ NOTE un-closed delimiter
+//~^ ERROR `main` function not found
+//~^^ NOTE main function must be defined
+//~^^^ NOTE you have one or more functions
   match Some(10) {
   //~^ NOTE this delimiter might not be properly closed...
       Some(y) => { panic!(); }
@@ -11,5 +14,5 @@ fn bar() {
     while (i < 1000) {}
 }
 
-fn main() {} //~ NOTE here is a function named 'main'
+fn main() {} //~ NOTE here is a function named `main`
              //~ ERROR this file contains an un-closed delimiter