From 0c4faf2a0785ea00f8498289dd2a558627b5bc66 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Wed, 26 Aug 2015 14:21:03 +0200 Subject: [PATCH] Add erroneous code example for E0131 --- src/librustc_typeck/diagnostics.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/librustc_typeck/diagnostics.rs b/src/librustc_typeck/diagnostics.rs index 2bf1c0bb4d35..526a895592bf 100644 --- a/src/librustc_typeck/diagnostics.rs +++ b/src/librustc_typeck/diagnostics.rs @@ -1721,6 +1721,12 @@ extern { E0131: r##" It is not possible to define `main` with type parameters, or even with function parameters. When `main` is present, it must take no arguments and return `()`. +Erroneous code example: + +``` +fn main() { // error: main function is not allowed to have type parameters +} +``` "##, E0132: r##"