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