2015-05-04 01:15:24 -05:00
|
|
|
#![feature(plugin)]
|
|
|
|
#![plugin(clippy)]
|
|
|
|
|
|
|
|
#[deny(ptr_arg)]
|
|
|
|
#[allow(unused)]
|
2015-08-12 03:46:49 -05:00
|
|
|
fn do_vec(x: &Vec<i64>) { //~ERROR: writing `&Vec<_>` instead of `&[_]`
|
2015-08-11 13:22:20 -05:00
|
|
|
//Nothing here
|
2015-05-04 01:15:24 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
#[deny(ptr_arg)]
|
|
|
|
#[allow(unused)]
|
|
|
|
fn do_str(x: &String) { //~ERROR
|
2015-08-11 13:22:20 -05:00
|
|
|
//Nothing here either
|
2015-05-04 01:15:24 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
2015-08-11 13:22:20 -05:00
|
|
|
let x = vec![1i64, 2, 3];
|
|
|
|
do_vec(&x);
|
|
|
|
do_str(&"hello".to_owned());
|
2015-05-04 01:15:24 -05:00
|
|
|
}
|