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> {
29 LL | fn cloned(x: &[u8]) -> Vec<u8> {
31 help: change `x.clone()` to
33 LL | let e = x.to_owned();
35 help: change `x.clone()` to
40 error: writing `&String` instead of `&str` involves a new object where a slice will do.
41 --> $DIR/ptr_arg.rs:50:18
43 LL | fn str_cloned(x: &String) -> String {
48 LL | fn str_cloned(x: &str) -> String {
50 help: change `x.clone()` to
52 LL | let a = x.to_string();
54 help: change `x.clone()` to
56 LL | let b = x.to_string();
58 help: change `x.clone()` to
63 error: writing `&String` instead of `&str` involves a new object where a slice will do.
64 --> $DIR/ptr_arg.rs:58:44
66 LL | fn false_positive_capacity(x: &Vec<u8>, y: &String) {
71 LL | fn false_positive_capacity(x: &Vec<u8>, y: &str) {
73 help: change `y.clone()` to
75 LL | let b = y.to_string();
77 help: change `y.as_str()` to
82 error: using a reference to `Cow` is not recommended.
83 --> $DIR/ptr_arg.rs:72:25
85 LL | fn test_cow_with_ref(c: &Cow<[i32]>) {}
86 | ^^^^^^^^^^^ help: change this to: `&[i32]`
88 error: aborting due to 7 previous errors