1 error: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices.
2 --> $DIR/ptr_arg.rs:6:14
4 LL | 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:15:14
12 LL | 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:28:18
18 LL | 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:41:14
24 LL | fn cloned(x: &Vec<u8>) -> Vec<u8> {
28 LL | fn cloned(x: &[u8]) -> Vec<u8> {
30 help: change `x.clone()` to
32 LL | 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:50:18
42 LL | fn str_cloned(x: &String) -> String {
46 LL | fn str_cloned(x: &str) -> String {
48 help: change `x.clone()` to
50 LL | let a = x.to_string();
52 help: change `x.clone()` to
54 LL | 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:58:44
64 LL | fn false_positive_capacity(x: &Vec<u8>, y: &String) {
68 LL | fn false_positive_capacity(x: &Vec<u8>, y: &str) {
70 help: change `y.clone()` to
72 LL | 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:72:25
82 LL | fn test_cow_with_ref(c: &Cow<[i32]>) {}
83 | ^^^^^^^^^^^ help: change this to: `&[i32]`
85 error: aborting due to 7 previous errors