2015-05-04 01:15:24 -05:00
|
|
|
#![feature(plugin)]
|
|
|
|
#![plugin(clippy)]
|
2015-08-21 11:28:17 -05:00
|
|
|
#![allow(unused)]
|
|
|
|
#![deny(ptr_arg)]
|
2015-05-04 01:15:24 -05:00
|
|
|
|
2015-08-13 01:12:07 -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
|
|
|
}
|
|
|
|
|
2015-08-21 11:28:17 -05:00
|
|
|
fn do_vec_mut(x: &mut Vec<i64>) { // no error here
|
|
|
|
//Nothing here
|
|
|
|
}
|
|
|
|
|
2015-08-13 01:12:07 -05:00
|
|
|
fn do_str(x: &String) { //~ERROR writing `&String` instead of `&str`
|
2015-08-11 13:22:20 -05:00
|
|
|
//Nothing here either
|
2015-05-04 01:15:24 -05:00
|
|
|
}
|
|
|
|
|
2015-08-21 11:28:17 -05:00
|
|
|
fn do_str_mut(x: &mut String) { // no error here
|
|
|
|
//Nothing here either
|
|
|
|
}
|
|
|
|
|
2015-05-04 01:15:24 -05:00
|
|
|
fn main() {
|
|
|
|
}
|
2015-10-30 18:48:05 -05:00
|
|
|
|
|
|
|
trait Foo {
|
|
|
|
type Item;
|
|
|
|
fn do_vec(x: &Vec<i64>); //~ERROR writing `&Vec<_>`
|
|
|
|
fn do_item(x: &Self::Item);
|
|
|
|
}
|
|
|
|
|
|
|
|
struct Bar;
|
|
|
|
|
|
|
|
// no error, in trait impl (#425)
|
|
|
|
impl Foo for Bar {
|
|
|
|
type Item = Vec<u8>;
|
|
|
|
fn do_vec(x: &Vec<i64>) {}
|
|
|
|
fn do_item(x: &Vec<u8>) {}
|
|
|
|
}
|