]> git.lizzy.rs Git - rust.git/blob - src/test/ui/coercion/coerce-reborrow-imm-vec-rcvr.rs
Auto merge of #103590 - compiler-errors:ocx-more, r=lcnr
[rust.git] / src / test / ui / coercion / coerce-reborrow-imm-vec-rcvr.rs
1 // run-pass
2
3
4 fn bar(v: &mut [usize]) -> Vec<usize> {
5     v.to_vec()
6 }
7
8 fn bip(v: &[usize]) -> Vec<usize> {
9     v.to_vec()
10 }
11
12 pub fn main() {
13     let mut the_vec = vec![1, 2, 3, 100];
14     assert_eq!(the_vec.clone(), bar(&mut the_vec));
15     assert_eq!(the_vec.clone(), bip(&the_vec));
16 }