rust/tests/ui/issues/issue-18685.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
333 B
Rust
Raw Normal View History

// run-pass
2014-11-06 08:06:41 +00:00
// Test that the self param space is not used in a conflicting
// manner by unboxed closures within a default method on a trait
// pretty-expanded FIXME #23616
2014-11-06 08:06:41 +00:00
trait Tr {
fn foo(&self);
fn bar(&self) {
(|| { self.foo() })()
2014-11-06 08:06:41 +00:00
}
}
impl Tr for () {
fn foo(&self) {}
}
fn main() {
().bar();
}