]> git.lizzy.rs Git - rust.git/blob - src/test/ui/impl-not-adjacent-to-type.rs
Merge commit '63734fcdd718cca089f84c42f3a42c0096cfd431' into sync_cg_clif-2022-05-15
[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 }