mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 17:24:06 +00:00
14 lines
461 B
Rust
14 lines
461 B
Rust
// Regression test for #110899.
|
|
// When looking for the elided lifetime for `wrap`,
|
|
// we must not consider the lifetimes in `bar` as candidates.
|
|
|
|
fn wrap(self: Wrap<{ fn bar(&self) {} }>) -> &() {
|
|
//~^ ERROR `self` parameter is only allowed in associated functions
|
|
//~| ERROR `self` parameter is only allowed in associated functions
|
|
//~| ERROR missing lifetime specifier
|
|
//~| ERROR cannot find type `Wrap` in this scope
|
|
&()
|
|
}
|
|
|
|
fn main() {}
|