2018-09-04 12:05:53 +02:00
|
|
|
// run-pass
|
2018-09-25 23:51:35 +02:00
|
|
|
#![allow(dead_code)]
|
2014-05-05 18:56:44 -07:00
|
|
|
|
2015-03-22 13:13:15 -07:00
|
|
|
// pretty-expanded FIXME #23616
|
|
|
|
|
2015-03-25 17:06:52 -07:00
|
|
|
fn borrow(_v: &isize) {}
|
2012-04-26 16:02:01 -07:00
|
|
|
|
2015-03-25 17:06:52 -07:00
|
|
|
fn borrow_from_arg_imm_ref(v: Box<isize>) {
|
2014-07-07 16:35:15 -07:00
|
|
|
borrow(&*v);
|
2012-04-26 16:02:01 -07:00
|
|
|
}
|
|
|
|
|
2015-03-25 17:06:52 -07:00
|
|
|
fn borrow_from_arg_mut_ref(v: &mut Box<isize>) {
|
2014-07-07 16:35:15 -07:00
|
|
|
borrow(&**v);
|
2012-04-26 16:02:01 -07:00
|
|
|
}
|
|
|
|
|
2015-03-25 17:06:52 -07:00
|
|
|
fn borrow_from_arg_copy(v: Box<isize>) {
|
2014-07-07 16:35:15 -07:00
|
|
|
borrow(&*v);
|
2012-04-26 16:02:01 -07:00
|
|
|
}
|
|
|
|
|
2013-02-01 19:43:17 -08:00
|
|
|
pub fn main() {
|
2012-04-26 16:02:01 -07:00
|
|
|
}
|