@@ -231,6 +231,42 @@ error: writing `&String` instead of `&str` involves a new object where a slice w
231231LL |     fn good(v1: &String, v2: &String) {
232232   |                              ^^^^^^^ help: change this to: `&str`
233233
234+ error: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do
235+   --> tests/ui/ptr_arg.rs:363:20
236+    |
237+ LL |     fn foo_used(x: &mut Vec<i32>) {
238+    |                    ^^^^^^^^^^^^^ help: change this to: `&mut [i32]`
239+ 
240+ error: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do
241+   --> tests/ui/ptr_arg.rs:377:26
242+    |
243+ LL |     fn foo_local_used(x: &mut Vec<i32>) {
244+    |                          ^^^^^^^^^^^^^ help: change this to: `&mut [i32]`
245+ 
246+ error: writing `&mut String` instead of `&mut str` involves a new object where a slice will do
247+   --> tests/ui/ptr_arg.rs:386:37
248+    |
249+ LL |     fn foofoo(_x: &mut Vec<i32>, y: &mut String) {
250+    |                                     ^^^^^^^^^^^ help: change this to: `&mut str`
251+ 
252+ error: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do
253+   --> tests/ui/ptr_arg.rs:407:20
254+    |
255+ LL |     fn bar_used(x: &mut Vec<u32>) {
256+    |                    ^^^^^^^^^^^^^ help: change this to: `&mut [u32]`
257+ 
258+ error: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do
259+   --> tests/ui/ptr_arg.rs:421:26
260+    |
261+ LL |     fn bar_local_used(x: &mut Vec<u32>) {
262+    |                          ^^^^^^^^^^^^^ help: change this to: `&mut [u32]`
263+ 
264+ error: writing `&mut String` instead of `&mut str` involves a new object where a slice will do
265+   --> tests/ui/ptr_arg.rs:430:37
266+    |
267+ LL |     fn barbar(_x: &mut Vec<u32>, y: &mut String) {
268+    |                                     ^^^^^^^^^^^ help: change this to: `&mut str`
269+ 
234270error: lifetime flowing from input to output with different syntax can be confusing
235271  --> tests/ui/ptr_arg.rs:314:36
236272   |
@@ -247,5 +283,5 @@ help: one option is to consistently use `'a`
247283LL |     fn cow_good_ret_ty<'a>(input: &'a Cow<'a, str>) -> &'a str {
248284   |                                                         ++
249285
250- error: aborting due to 27  previous errors
286+ error: aborting due to 33  previous errors
251287
0 commit comments