summaryrefslogtreecommitdiffstats
path: root/tests/ui/self/elision/nested-item.rs
blob: 4bcb645c60eef797823579238fdcd37ff319f05b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// 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() {}