1 error: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices.
2 --> $DIR/ptr_arg.rs:8:14
4 8 | fn do_vec(x: &Vec<i64>) {
5 | ^^^^^^^^^ help: change this to: `&[i64]`
7 = note: `-D clippy::ptr-arg` implied by `-D warnings`
9 error: writing `&String` instead of `&str` involves a new object where a slice will do.
10 --> $DIR/ptr_arg.rs:16:14
12 16 | fn do_str(x: &String) {
13 | ^^^^^^^ help: change this to: `&str`
15 error: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices.
16 --> $DIR/ptr_arg.rs:29:18
18 29 | fn do_vec(x: &Vec<i64>);
19 | ^^^^^^^^^ help: change this to: `&[i64]`
21 error: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices.
22 --> $DIR/ptr_arg.rs:42:14
24 42 | fn cloned(x: &Vec<u8>) -> Vec<u8> {
28 42 | fn cloned(x: &[u8]) -> Vec<u8> {
30 help: change `x.clone()` to
32 43 | let e = x.to_owned();
34 help: change `x.clone()` to
39 error: writing `&String` instead of `&str` involves a new object where a slice will do.
40 --> $DIR/ptr_arg.rs:51:18
42 51 | fn str_cloned(x: &String) -> String {
46 51 | fn str_cloned(x: &str) -> String {
48 help: change `x.clone()` to
50 52 | let a = x.to_string();
52 help: change `x.clone()` to
54 53 | let b = x.to_string();
56 help: change `x.clone()` to
61 error: writing `&String` instead of `&str` involves a new object where a slice will do.
62 --> $DIR/ptr_arg.rs:61:44
64 61 | fn false_positive_capacity(x: &Vec<u8>, y: &String) {
68 61 | fn false_positive_capacity(x: &Vec<u8>, y: &str) {
70 help: change `y.clone()` to
72 63 | let b = y.to_string();
74 help: change `y.as_str()` to
79 error: using a reference to `Cow` is not recommended.
80 --> $DIR/ptr_arg.rs:73:25
82 73 | fn test_cow_with_ref(c: &Cow<[i32]>) {
83 | ^^^^^^^^^^^ help: change this to: `&[i32]`
85 error: aborting due to 7 previous errors