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 5cb0387 commit bbc43a4Copy full SHA for bbc43a4
src/test/compile-fail/array_const_index-0.rs
@@ -8,8 +8,10 @@
8
// option. This file may not be copied, modified, or distributed
9
// except according to those terms.
10
11
-static a: &'static [i32] = &[];
12
-static b: i32 = (&a)[1]; //~ ERROR: array index out of bounds
+static A: &'static [i32] = &[];
+static B: i32 = (&A)[1]; //~ ERROR: array index out of bounds
13
//~^ ERROR: constant indexing failed
14
15
-fn main() {}
+fn main() {
16
+ let _ = B;
17
+}
0 commit comments