Skip to content

Commit 98faf54

Browse files
committed
rustc: Add long diagnostics for E0306 and E0307
1 parent 84ef869 commit 98faf54

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/librustc/diagnostics.rs

+10-2
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,16 @@ match Some(5) {
293293
}
294294
295295
See also https://github.com/rust-lang/rust/issues/14587
296+
"##,
297+
298+
E0306: r##"
299+
In an array literal `[x; N]`, `N` is the number of elements in the array. This
300+
number cannot be negative.
301+
"##,
302+
303+
E0307: r##"
304+
The length of an array is part of its type. For this reason, this length must be
305+
a compile-time constant.
296306
"##
297307

298308
}
@@ -353,8 +363,6 @@ register_diagnostics! {
353363
E0300, // unexpanded macro
354364
E0304, // expected signed integer constant
355365
E0305, // expected constant
356-
E0306, // expected positive integer for repeat count
357-
E0307, // expected constant integer for repeat count
358366
E0308,
359367
E0309, // thing may not live long enough
360368
E0310, // thing may not live long enough

0 commit comments

Comments
 (0)