]> git.proxmox.com Git - rustc.git/blob - src/test/ui/issues/issue-18685.rs
New upstream version 1.49.0+dfsg1
[rustc.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 }