]> git.lizzy.rs Git - rust.git/blob - tests/ui/borrowck/borrowck-lend-args.rs
Rollup merge of #106726 - cmorin6:fix-comment-typos, r=Nilstrieb
[rust.git] / tests / ui / borrowck / borrowck-lend-args.rs
1 // run-pass
2 #![allow(dead_code)]
3
4 // pretty-expanded FIXME #23616
5
6 fn borrow(_v: &isize) {}
7
8 fn borrow_from_arg_imm_ref(v: Box<isize>) {
9     borrow(&*v);
10 }
11
12 fn borrow_from_arg_mut_ref(v: &mut Box<isize>) {
13     borrow(&**v);
14 }
15
16 fn borrow_from_arg_copy(v: Box<isize>) {
17     borrow(&*v);
18 }
19
20 pub fn main() {
21 }