]> git.lizzy.rs Git - rust.git/commitdiff
rustc: Add long diagnostics for E0306 and E0307
authorChris Wong <lambda.fairy@gmail.com>
Wed, 15 Apr 2015 09:15:09 +0000 (21:15 +1200)
committerSteve Klabnik <steve@steveklabnik.com>
Fri, 17 Apr 2015 02:23:36 +0000 (22:23 -0400)
src/librustc/diagnostics.rs

index 222ebb09f915b7956979b3b5b0dbc4c411fd331f..e1eb8d74186952fd9f1aabd11e5db0db2e4a9946 100644 (file)
@@ -293,6 +293,16 @@ enum Method { GET, POST }
 }
 
 See also https://github.com/rust-lang/rust/issues/14587
+"##,
+
+E0306: r##"
+In an array literal `[x; N]`, `N` is the number of elements in the array. This
+number cannot be negative.
+"##,
+
+E0307: r##"
+The length of an array is part of its type. For this reason, this length must be
+a compile-time constant.
 "##
 
 }
@@ -353,8 +363,6 @@ enum Method { GET, POST }
     E0300, // unexpanded macro
     E0304, // expected signed integer constant
     E0305, // expected constant
-    E0306, // expected positive integer for repeat count
-    E0307, // expected constant integer for repeat count
     E0308,
     E0309, // thing may not live long enough
     E0310, // thing may not live long enough