]> git.proxmox.com Git - rustc.git/blame - src/test/ui/issues/issue-57362-1.rs
New upstream version 1.60.0+dfsg1
[rustc.git] / src / test / ui / issues / issue-57362-1.rs
CommitLineData
9fa01778
XL
1// Test for issue #57362, ensuring that the self ty is shown in cases of higher-ranked lifetimes
2// conflicts: the `expected` and `found` trait refs would otherwise be printed the same, leading
3// to confusing notes such as:
4// = note: expected type `Trait`
5// found type `Trait`
6
7// from issue #57362
8trait Trait {
9 fn f(self);
10}
11
12impl<T> Trait for fn(&T) {
13 fn f(self) {
14 println!("f");
15 }
16}
17
18fn f() {
19 let a: fn(_) = |_: &u8| {};
20 a.f(); //~ ERROR no method named `f`
21}
22
23fn main() {}