Skip to content

Commit bbc43a4

Browse files
author
Oliver 'ker' Schneider
committed
compile-fail tests don't like warnings
1 parent 5cb0387 commit bbc43a4

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/test/compile-fail/array_const_index-0.rs

+5-3
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
static a: &'static [i32] = &[];
12-
static b: i32 = (&a)[1]; //~ ERROR: array index out of bounds
11+
static A: &'static [i32] = &[];
12+
static B: i32 = (&A)[1]; //~ ERROR: array index out of bounds
1313
//~^ ERROR: constant indexing failed
1414

15-
fn main() {}
15+
fn main() {
16+
let _ = B;
17+
}

0 commit comments

Comments
 (0)