mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-19 20:13:47 +00:00
b2df15d65a
* do not trigger on mutable references * use "real" type from ty, not AST type
24 lines
432 B
Rust
Executable File
24 lines
432 B
Rust
Executable File
#![feature(plugin)]
|
|
#![plugin(clippy)]
|
|
#![allow(unused)]
|
|
#![deny(ptr_arg)]
|
|
|
|
fn do_vec(x: &Vec<i64>) { //~ERROR writing `&Vec<_>` instead of `&[_]`
|
|
//Nothing here
|
|
}
|
|
|
|
fn do_vec_mut(x: &mut Vec<i64>) { // no error here
|
|
//Nothing here
|
|
}
|
|
|
|
fn do_str(x: &String) { //~ERROR writing `&String` instead of `&str`
|
|
//Nothing here either
|
|
}
|
|
|
|
fn do_str_mut(x: &mut String) { // no error here
|
|
//Nothing here either
|
|
}
|
|
|
|
fn main() {
|
|
}
|