diff --git a/tests/compile-fail/for_loop.rs b/tests/compile-fail/for_loop.rs index 7a18c210d0c..59b77f6421b 100644 --- a/tests/compile-fail/for_loop.rs +++ b/tests/compile-fail/for_loop.rs @@ -16,7 +16,8 @@ impl Unrelated { #[deny(needless_range_loop, explicit_iter_loop, iter_next_loop, reverse_range_loop, explicit_counter_loop)] #[deny(unused_collect)] -#[allow(linkedlist,shadow_unrelated,unnecessary_mut_passed, cyclomatic_complexity)] +#[allow(linkedlist,shadow_unrelated,unnecessary_mut_passed, cyclomatic_complexity, + used_underscore_binding)] fn main() { let mut vec = vec![1, 2, 3, 4]; let vec2 = vec![1, 2, 3, 4]; diff --git a/tests/compile-fail/range.rs b/tests/compile-fail/range.rs index 2d731670cbe..064d9f55173 100644 --- a/tests/compile-fail/range.rs +++ b/tests/compile-fail/range.rs @@ -22,8 +22,8 @@ fn main() { let y = NotARange; y.step_by(0); - let _v1 = vec![1,2,3]; - let _v2 = vec![4,5]; - let _x = _v1.iter().zip(0.._v1.len()); //~ERROR It is more idiomatic to use _v1.iter().enumerate() - let _y = _v1.iter().zip(0.._v2.len()); // No error + let v1 = vec![1,2,3]; + let v2 = vec![4,5]; + let _x = v1.iter().zip(0..v1.len()); //~ERROR It is more idiomatic to use v1.iter().enumerate() + let _y = v1.iter().zip(0..v2.len()); // No error }