mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
21 lines
335 B
Rust
21 lines
335 B
Rust
//@ run-pass
|
|
// 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
|
|
|
|
trait Tr {
|
|
fn foo(&self);
|
|
|
|
fn bar(&self) {
|
|
(|| { self.foo() })()
|
|
}
|
|
}
|
|
|
|
impl Tr for () {
|
|
fn foo(&self) {}
|
|
}
|
|
|
|
fn main() {
|
|
().bar();
|
|
}
|