Skip to content

Commit

Permalink
Auto merge of #4606 - Manishearth:rustup, r=centril
Browse files Browse the repository at this point in the history
Fix some tests

Might be breaking the rustup? I can't tell, I can't reproduce errors on CI

rust-lang/rust#64963 (comment)
  • Loading branch information
bors committed Oct 1, 2019
2 parents b462905 + f513aa3 commit 9a82250
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 12 deletions.
2 changes: 1 addition & 1 deletion tests/ui/out_of_bounds_indexing/empty_array.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#![warn(clippy::out_of_bounds_indexing)]
#![allow(clippy::no_effect, clippy::unnecessary_operation)]
#![allow(clippy::no_effect, clippy::unnecessary_operation, const_err)]

fn main() {
let empty: [i8; 0] = [];
Expand Down
10 changes: 1 addition & 9 deletions tests/ui/out_of_bounds_indexing/empty_array.stderr
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
error: index out of bounds: the len is 0 but the index is 0
--> $DIR/empty_array.rs:6:5
|
LL | empty[0];
| ^^^^^^^^
|
= note: `#[deny(const_err)]` on by default

error: range is out of bounds
--> $DIR/empty_array.rs:7:12
|
Expand Down Expand Up @@ -50,5 +42,5 @@ error: range is out of bounds
LL | &empty[..=0];
| ^

error: aborting due to 8 previous errors
error: aborting due to 7 previous errors

2 changes: 1 addition & 1 deletion tests/ui/out_of_bounds_indexing/issue-3102.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#![warn(clippy::out_of_bounds_indexing)]
#![allow(clippy::no_effect)]
#![allow(clippy::no_effect, const_err)]

fn main() {
let x = [1, 2, 3, 4];
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/out_of_bounds_indexing/simple.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#![warn(clippy::out_of_bounds_indexing)]
#![allow(clippy::no_effect, clippy::unnecessary_operation)]
#![allow(clippy::no_effect, clippy::unnecessary_operation, const_err)]

fn main() {
let x = [1, 2, 3, 4];
Expand Down

0 comments on commit 9a82250

Please sign in to comment.