diff options
| -rw-r--r-- | src/librustc_typeck/diagnostics.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/librustc_typeck/diagnostics.rs b/src/librustc_typeck/diagnostics.rs index 2bf1c0bb4d3..526a895592b 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<T>() { // error: main function is not allowed to have type parameters +} +``` "##, E0132: r##" |
