Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fanzier committed Jun 5, 2018
1 parent 29c43fe commit 9600489
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/test/compile-fail/const-err-early.rs
Expand Up @@ -19,8 +19,8 @@ pub const C: u8 = 200u8 * 4; //~ ERROR const_err
//~^ ERROR this constant cannot be used
pub const D: u8 = 42u8 - (42u8 + 1); //~ ERROR const_err
//~^ ERROR this constant cannot be used
pub const E: u8 = [5u8][1];
//~^ ERROR const_err
pub const E: u8 = [5u8][1]; //~ ERROR const_err
//~| ERROR this constant cannot be used

fn main() {
let _a = A;
Expand Down
1 change: 1 addition & 0 deletions src/test/compile-fail/const-err2.rs
Expand Up @@ -31,6 +31,7 @@ fn main() {
let d = 42u8 - (42u8 + 1);
//~^ ERROR const_err
let _e = [5u8][1];
//~^ ERROR const_err
black_box(a);
black_box(b);
black_box(c);
Expand Down
1 change: 1 addition & 0 deletions src/test/compile-fail/const-err3.rs
Expand Up @@ -23,6 +23,7 @@ fn main() {
let d = 42u8 - (42u8 + 1);
//~^ ERROR const_err
let _e = [5u8][1];
//~^ ERROR const_err
black_box(b);
black_box(c);
black_box(d);
Expand Down
1 change: 1 addition & 0 deletions src/test/run-fail/mir_indexing_oob_1.rs
Expand Up @@ -12,6 +12,7 @@

const C: [u32; 5] = [0; 5];

#[allow(const_err)]
fn test() -> u32 {
C[10]
}
Expand Down
1 change: 1 addition & 0 deletions src/test/run-fail/mir_indexing_oob_2.rs
Expand Up @@ -12,6 +12,7 @@

const C: &'static [u8; 5] = b"hello";

#[allow(const_err)]
fn test() -> u8 {
C[10]
}
Expand Down
1 change: 1 addition & 0 deletions src/test/run-fail/mir_indexing_oob_3.rs
Expand Up @@ -12,6 +12,7 @@

const C: &'static [u8; 5] = b"hello";

#[allow(const_err)]
fn mir() -> u8 {
C[10]
}
Expand Down

0 comments on commit 9600489

Please sign in to comment.