mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 14:31:55 +00:00
24 lines
363 B
Rust
24 lines
363 B
Rust
// run-pass
|
|
#![allow(dead_code)]
|
|
|
|
// pretty-expanded FIXME #23616
|
|
|
|
struct Point {
|
|
x: isize,
|
|
y: isize
|
|
}
|
|
|
|
struct Character {
|
|
pos: Box<Point>,
|
|
}
|
|
|
|
fn get_x(x: &Character) -> &isize {
|
|
// interesting case because the scope of this
|
|
// borrow of the unique pointer is in fact
|
|
// larger than the fn itself
|
|
return &x.pos.x;
|
|
}
|
|
|
|
pub fn main() {
|
|
}
|