mirror of
https://git.proxmox.com/git/rustc
synced 2025-08-17 20:06:38 +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() {}
|