about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2015-08-26 14:21:03 +0200
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2015-08-26 14:21:03 +0200
commit0c4faf2a0785ea00f8498289dd2a558627b5bc66 (patch)
tree7555dbb958a26495f208daeec1b126008d13d5a7
parentaf02bccb41a2432d13686d0d5828118ea7d23bb2 (diff)
downloadrust-0c4faf2a0785ea00f8498289dd2a558627b5bc66.tar.gz
rust-0c4faf2a0785ea00f8498289dd2a558627b5bc66.zip
Add erroneous code example for E0131
-rw-r--r--src/librustc_typeck/diagnostics.rs6
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##"