]>
git.proxmox.com Git - rustc.git/blob - src/tools/clippy/tests/ui/iter_cloned_collect.rs
5 use std
::collections
::HashSet
;
6 use std
::collections
::VecDeque
;
9 let v
= [1, 2, 3, 4, 5];
10 let v2
: Vec
<isize> = v
.iter().cloned().collect();
11 let v3
: HashSet
<isize> = v
.iter().cloned().collect();
12 let v4
: VecDeque
<isize> = v
.iter().cloned().collect();
14 // Handle macro expansion in suggestion
15 let _
: Vec
<isize> = vec
![1, 2, 3].iter().cloned().collect();
19 let _
: Vec
<u8> = std
::ffi
::CStr
::from_ptr(std
::ptr
::null())
27 let arr
: [u8; 64] = [0; 64];
28 let _
: Vec
<_
> = arr
.iter().cloned().collect();