You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. Consider changing the type to `&[...]`
1
+
error: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices.
2
2
--> $DIR/ptr_arg.rs:6:14
3
3
|
4
4
6 | fn do_vec(x: &Vec<i64>) {
5
-
| ^^^^^^^^^
5
+
| ^^^^^^^^^ help: change this to: `&[i64]`
6
6
|
7
7
= note: `-D ptr-arg` implied by `-D warnings`
8
8
9
-
error: writing `&String` instead of `&str` involves a new object where a slice will do. Consider changing the type to `&str`
9
+
error: writing `&String` instead of `&str` involves a new object where a slice will do.
10
10
--> $DIR/ptr_arg.rs:14:14
11
11
|
12
12
14 | fn do_str(x: &String) {
13
-
| ^^^^^^^
13
+
| ^^^^^^^ help: change this to: `&str`
14
14
15
-
error: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. Consider changing the type to `&[...]`
15
+
error: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices.
0 commit comments