blob: 97caf908387784e094af4d65edd355a97ac9eb25 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
// run-pass
mod foo {
pub struct Point {
pub x: i32,
pub y: i32,
}
}
impl foo::Point {
fn x(&self) -> i32 { self.x }
}
fn main() {
assert_eq!((foo::Point { x: 1, y: 3}).x(), 1);
}
|