2018-08-30 14:18:55 +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
|
|
|
|
|
2013-03-06 19:09:17 -08:00
|
|
|
struct Point {
|
2015-03-25 17:06:52 -07:00
|
|
|
x: isize,
|
|
|
|
y: isize
|
2013-03-06 19:09:17 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
struct Character {
|
2014-05-05 18:56:44 -07:00
|
|
|
pos: Box<Point>,
|
2013-03-06 19:09:17 -08:00
|
|
|
}
|
2012-07-26 08:51:57 -07:00
|
|
|
|
2015-03-25 17:06:52 -07:00
|
|
|
fn get_x(x: &Character) -> &isize {
|
2012-07-26 08:51:57 -07:00
|
|
|
// interesting case because the scope of this
|
|
|
|
// borrow of the unique pointer is in fact
|
|
|
|
// larger than the fn itself
|
2012-08-01 17:30:05 -07:00
|
|
|
return &x.pos.x;
|
2012-07-26 08:51:57 -07:00
|
|
|
}
|
|
|
|
|
2013-02-01 19:43:17 -08:00
|
|
|
pub fn main() {
|
2012-07-26 08:51:57 -07:00
|
|
|
}
|