mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-01 03:03:40 +00:00
Fix tests
This commit is contained in:
parent
52aee99f6d
commit
c5ab8d62e3
@ -16,7 +16,7 @@ impl Unrelated {
|
|||||||
|
|
||||||
#[deny(needless_range_loop, explicit_iter_loop, iter_next_loop, reverse_range_loop, explicit_counter_loop)]
|
#[deny(needless_range_loop, explicit_iter_loop, iter_next_loop, reverse_range_loop, explicit_counter_loop)]
|
||||||
#[deny(unused_collect)]
|
#[deny(unused_collect)]
|
||||||
#[allow(linkedlist,shadow_unrelated)]
|
#[allow(linkedlist,shadow_unrelated,unnecessary_mut_passed)]
|
||||||
fn main() {
|
fn main() {
|
||||||
let mut vec = vec![1, 2, 3, 4];
|
let mut vec = vec![1, 2, 3, 4];
|
||||||
let vec2 = vec![1, 2, 3, 4];
|
let vec2 = vec![1, 2, 3, 4];
|
||||||
|
@ -1,9 +1,12 @@
|
|||||||
#![feature(plugin)]
|
#![feature(plugin)]
|
||||||
#![plugin(clippy)]
|
#![plugin(clippy)]
|
||||||
|
|
||||||
|
#![allow(unused_variable)]
|
||||||
|
|
||||||
fn takes_an_immutable_reference(a: &i32) {
|
fn takes_an_immutable_reference(a: &i32) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
fn takes_a_mutable_reference(a: &mut i32) {
|
fn takes_a_mutable_reference(a: &mut i32) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -32,7 +35,7 @@ fn main() {
|
|||||||
// Functions
|
// Functions
|
||||||
takes_an_immutable_reference(&42);
|
takes_an_immutable_reference(&42);
|
||||||
takes_a_mutable_reference(&mut 42);
|
takes_a_mutable_reference(&mut 42);
|
||||||
let mut a = &mut 42;
|
let a = &mut 42;
|
||||||
takes_an_immutable_reference(a);
|
takes_an_immutable_reference(a);
|
||||||
|
|
||||||
// Methods
|
// Methods
|
||||||
|
Loading…
Reference in New Issue
Block a user