]>
git.proxmox.com Git - rustc.git/blob - src/tools/clippy/tests/ui/vec.rs
9 fn on_slice(_
: &[u8]) {}
11 fn on_vec(_
: &Vec
<u8>) {}
18 fn length(&self) -> usize {
27 on_slice(&vec
![1, 2]);
30 on_slice(&vec
![1, 2]);
33 on_slice(&vec
!(1, 2));
36 on_slice(&vec
![1; 2]);
43 // Now with non-constant expressions
44 let line
= Line { length: 2 }
;
46 on_slice(&vec
![2; line
.length
]);
47 on_slice(&vec
![2; line
.length()]);
49 for a
in vec
![1, 2, 3] {
53 for a
in vec
![NonCopy
, NonCopy
] {