]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-18685.rs
Rollup merge of #100168 - WaffleLapkin:improve_diagnostics_for_missing_type_in_a_cons...
[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 }