]> git.lizzy.rs Git - rust.git/blob - tests/ui/coercion/coerce-reborrow-imm-vec-rcvr.rs
Rollup merge of #106446 - bzEq:fix-unwind-lsda, r=Amanieu
[rust.git] / tests / 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 }