diff options
Diffstat (limited to 'tests/ui/borrowck/borrowck-lend-args.rs')
-rw-r--r-- | tests/ui/borrowck/borrowck-lend-args.rs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/ui/borrowck/borrowck-lend-args.rs b/tests/ui/borrowck/borrowck-lend-args.rs new file mode 100644 index 000000000..d0ef2dcdd --- /dev/null +++ b/tests/ui/borrowck/borrowck-lend-args.rs @@ -0,0 +1,21 @@ +// run-pass +#![allow(dead_code)] + +// pretty-expanded FIXME #23616 + +fn borrow(_v: &isize) {} + +fn borrow_from_arg_imm_ref(v: Box<isize>) { + borrow(&*v); +} + +fn borrow_from_arg_mut_ref(v: &mut Box<isize>) { + borrow(&**v); +} + +fn borrow_from_arg_copy(v: Box<isize>) { + borrow(&*v); +} + +pub fn main() { +} |