Skip to content

Commit c5ab8d6

Browse files
Fix tests
1 parent 52aee99 commit c5ab8d6

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

tests/compile-fail/for_loop.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ impl Unrelated {
1616

1717
#[deny(needless_range_loop, explicit_iter_loop, iter_next_loop, reverse_range_loop, explicit_counter_loop)]
1818
#[deny(unused_collect)]
19-
#[allow(linkedlist,shadow_unrelated)]
19+
#[allow(linkedlist,shadow_unrelated,unnecessary_mut_passed)]
2020
fn main() {
2121
let mut vec = vec![1, 2, 3, 4];
2222
let vec2 = vec![1, 2, 3, 4];

tests/compile-fail/mut_reference.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
#![feature(plugin)]
22
#![plugin(clippy)]
33

4+
#![allow(unused_variable)]
5+
46
fn takes_an_immutable_reference(a: &i32) {
57
}
68

9+
710
fn takes_a_mutable_reference(a: &mut i32) {
811
}
912

@@ -32,7 +35,7 @@ fn main() {
3235
// Functions
3336
takes_an_immutable_reference(&42);
3437
takes_a_mutable_reference(&mut 42);
35-
let mut a = &mut 42;
38+
let a = &mut 42;
3639
takes_an_immutable_reference(a);
3740

3841
// Methods

0 commit comments

Comments
 (0)