]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-18685.rs
Merge commit '97e504549371d7640cf011d266e3c17394fdddac' into sync_cg_clif-2021-12-20
[rust.git] / src / test / ui / issues / issue-18685.rs
1 // run-pass
2 // Test that the self param space is not used in a conflicting
3 // manner by unboxed closures within a default method on a trait
4
5 // pretty-expanded FIXME #23616
6
7 trait Tr {
8     fn foo(&self);
9
10     fn bar(&self) {
11         (|| { self.foo() })()
12     }
13 }
14
15 impl Tr for () {
16     fn foo(&self) {}
17 }
18
19 fn main() {
20     ().bar();
21 }