]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc/diagnostics.rs
Add new error code
[rust.git] / src / librustc / diagnostics.rs
index 470dcb4bd61e10e431bf8e3392e3734c288081c7..2beb40d6b2f1ab34598a52849779be57a9ca4f72 100644 (file)
@@ -1871,7 +1871,9 @@ extern "C" fn foo(userdata: Box<i32>) {
 
 E0593: r##"
 You tried to supply an `Fn`-based type with an incorrect number of arguments
-than what was expected. Erroneous code example:
+than what was expected.
+
+Erroneous code example:
 
 ```compile_fail,E0593
 fn foo<F: Fn()>(x: F) { }
@@ -1883,6 +1885,21 @@ fn main() {
 ```
 "##,
 
+E0601: r##"
+No `main` function was found in a binary crate. To fix this error, just add a
+`main` function. For example:
+
+```
+fn main() {
+    // Your program will start here.
+    println!("Hello world!");
+}
+```
+
+If you don't know the basics of Rust, you can go look to the Rust Book to get
+started: https://doc.rust-lang.org/book/
+"##,
+
 }