From d01f1314b7f1f29fbb7352becad7caa821774227 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Sat, 23 May 2020 13:19:57 +0200 Subject: [PATCH 1/2] Improve E0601 explanation --- src/librustc_error_codes/error_codes/E0601.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/librustc_error_codes/error_codes/E0601.md b/src/librustc_error_codes/error_codes/E0601.md index 8180c5db46fba..7194b7971d38f 100644 --- a/src/librustc_error_codes/error_codes/E0601.md +++ b/src/librustc_error_codes/error_codes/E0601.md @@ -1,5 +1,6 @@ -No `main` function was found in a binary crate. To fix this error, add a -`main` function. For example: +No `main` function was found in a binary crate. + +To fix this error, add a `main` function: ``` fn main() { From 37bdb3bb3b4323733f8ecdd4925ca314133c6fd0 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Tue, 26 May 2020 11:16:02 +0200 Subject: [PATCH 2/2] Update UI test --- src/test/ui/json-short.stderr | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/test/ui/json-short.stderr b/src/test/ui/json-short.stderr index 60c2582b11eae..3bd85b083d002 100644 --- a/src/test/ui/json-short.stderr +++ b/src/test/ui/json-short.stderr @@ -1,5 +1,6 @@ -{"message":"`main` function not found in crate `json_short`","code":{"code":"E0601","explanation":"No `main` function was found in a binary crate. To fix this error, add a -`main` function. For example: +{"message":"`main` function not found in crate `json_short`","code":{"code":"E0601","explanation":"No `main` function was found in a binary crate. + +To fix this error, add a `main` function: ``` fn main() {