1 #![warn(clippy::out_of_bounds_indexing)]
2 #![allow(clippy::no_effect, clippy::unnecessary_operation, const_err)]
11 &x[5..].iter().map(|x| 2 * x).collect::<Vec<i32>>();
14 &x[4..]; // Ok, should not produce stderr.
15 &x[..4]; // Ok, should not produce stderr.
16 &x[..]; // Ok, should not produce stderr.
17 &x[1..]; // Ok, should not produce stderr.
18 &x[2..].iter().map(|x| 2 * x).collect::<Vec<i32>>(); // Ok, should not produce stderr.
20 &x[0..].get(..3); // Ok, should not produce stderr.
21 &x[0..3]; // Ok, should not produce stderr.