We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8fee548 commit a94f684Copy full SHA for a94f684
src/librustc_trans/diagnostics.rs
@@ -12,6 +12,21 @@
12
13
register_long_diagnostics! {
14
15
+E0515: r##"
16
+A constant index expression was out of bounds. Erroneous code example:
17
+
18
+```
19
+let x = &[0, 1, 2][7]; // error: const index-expr is out of bounds
20
21
22
+Please specify a valid index (not inferior to 0 or superior to array length).
23
+Example:
24
25
26
+let x = &[0, 1, 2][2]; // ok!
27
28
+"##,
29
30
}
31
32
register_diagnostics! {
0 commit comments