summaryrefslogtreecommitdiffstats
path: root/tests/ui/borrowck/borrowck-lend-args.rs
blob: d0ef2dcdd28676bcfc25afbe1d8d6aea24f05764 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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() {
}