]> git.lizzy.rs Git - rust.git/blob - src/test/ui/impl-not-adjacent-to-type.rs
Rollup merge of #105758 - Nilstrieb:typeck-results-mod, r=compiler-errors
[rust.git] / src / test / ui / impl-not-adjacent-to-type.rs
1 // run-pass
2
3 mod foo {
4     pub struct Point {
5         pub x: i32,
6         pub y: i32,
7     }
8 }
9
10 impl foo::Point {
11     fn x(&self) -> i32 { self.x }
12 }
13
14 fn main() {
15     assert_eq!((foo::Point { x: 1, y: 3}).x(), 1);
16 }