2018-08-30 07:18:55 -05:00
|
|
|
// run-pass
|
2015-03-25 19:06:52 -05:00
|
|
|
fn foo(x: &usize) -> &usize { x }
|
|
|
|
fn bar(x: &usize) -> usize { *x }
|
2012-05-15 21:04:33 -05:00
|
|
|
|
2013-02-01 21:43:17 -06:00
|
|
|
pub fn main() {
|
2021-08-24 19:39:40 -05:00
|
|
|
let p: Box<_> = Box::new(3);
|
2014-07-07 18:35:15 -05:00
|
|
|
assert_eq!(bar(foo(&*p)), 3);
|
2012-05-15 21:04:33 -05:00
|
|
|
}
|