Allow const_err in out_of_bounds_indexing tests
This commit is contained in:
parent
9e166e09b8
commit
f513aa3a05
@ -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] = [];
|
||||
|
@ -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
|
||||
|
|
||||
@ -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
|
||||
|
||||
|
@ -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];
|
||||
|
@ -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];
|
||||
|
Loading…
Reference in New Issue
Block a user