Skip to content

Commit 9a82250

Browse files
committed
Auto merge of #4606 - Manishearth:rustup, r=centril
Fix some tests Might be breaking the rustup? I can't tell, I can't reproduce errors on CI rust-lang/rust#64963 (comment)
2 parents b462905 + f513aa3 commit 9a82250

File tree

4 files changed

+4
-12
lines changed

4 files changed

+4
-12
lines changed

tests/ui/out_of_bounds_indexing/empty_array.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#![warn(clippy::out_of_bounds_indexing)]
2-
#![allow(clippy::no_effect, clippy::unnecessary_operation)]
2+
#![allow(clippy::no_effect, clippy::unnecessary_operation, const_err)]
33

44
fn main() {
55
let empty: [i8; 0] = [];

tests/ui/out_of_bounds_indexing/empty_array.stderr

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
error: index out of bounds: the len is 0 but the index is 0
2-
--> $DIR/empty_array.rs:6:5
3-
|
4-
LL | empty[0];
5-
| ^^^^^^^^
6-
|
7-
= note: `#[deny(const_err)]` on by default
8-
91
error: range is out of bounds
102
--> $DIR/empty_array.rs:7:12
113
|
@@ -50,5 +42,5 @@ error: range is out of bounds
5042
LL | &empty[..=0];
5143
| ^
5244

53-
error: aborting due to 8 previous errors
45+
error: aborting due to 7 previous errors
5446

tests/ui/out_of_bounds_indexing/issue-3102.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#![warn(clippy::out_of_bounds_indexing)]
2-
#![allow(clippy::no_effect)]
2+
#![allow(clippy::no_effect, const_err)]
33

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

tests/ui/out_of_bounds_indexing/simple.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#![warn(clippy::out_of_bounds_indexing)]
2-
#![allow(clippy::no_effect, clippy::unnecessary_operation)]
2+
#![allow(clippy::no_effect, clippy::unnecessary_operation, const_err)]
33

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

0 commit comments

Comments
 (0)