]> git.lizzy.rs Git - rust.git/blob - tests/ui/typeck/issue-29124.rs
Auto merge of #107197 - aliemjay:patch-2, r=jackh726
[rust.git] / tests / ui / typeck / issue-29124.rs
1 struct Ret;
2 struct Obj;
3
4 impl Obj {
5     fn func() -> Ret {
6         Ret
7     }
8 }
9
10 fn func() -> Ret {
11     Ret
12 }
13
14 fn main() {
15     Obj::func.x();
16     //~^ ERROR no method named `x` found
17     func.x();
18     //~^ ERROR no method named `x` found
19 }