1 #![allow(unused, many_single_char_names)]
6 fn do_vec(x: &Vec<i64>) {
10 fn do_vec_mut(x: &mut Vec<i64>) { // no error here
14 fn do_str(x: &String) {
18 fn do_str_mut(x: &mut String) { // no error here
27 fn do_vec(x: &Vec<i64>);
28 fn do_item(x: &Self::Item);
33 // no error, in trait impl (#425)
36 fn do_vec(x: &Vec<i64>) {}
37 fn do_item(x: &Vec<u8>) {}
40 fn cloned(x: &Vec<u8>) -> Vec<u8> {
42 let f = e.clone(); // OK
44 let h = g.clone(); // Alas, we cannot reliably detect this without following data.
49 fn str_cloned(x: &String) -> String {
59 fn false_positive_capacity(x: &Vec<u8>, y: &String) {
65 fn false_positive_capacity_too(x: &String) -> String {
66 if x.capacity() > 1024 { panic!("Too large!"); }
71 fn test_cow_with_ref(c: &Cow<[i32]>) {
75 fn test_cow(c: Cow<[i32]>) {