]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-29124.rs
Auto merge of #57108 - Mark-Simulacrum:license-remove, r=pietroalbini
[rust.git] / src / test / ui / issues / 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 for type `fn() -> Ret {Obj::func}` in the current scope
17     func.x();
18     //~^ ERROR no method named `x` found for type `fn() -> Ret {func}` in the current scope
19 }