summaryrefslogtreecommitdiffstats
path: root/tests/ui/generic-associated-types/higher-ranked-self-impl-requirement.rs
blob: 5ef9437c968754e867204f4a9409e8ace15cdb9d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// check-pass

trait Database: for<'r> HasValueRef<'r, Database = Self> {}

trait HasValueRef<'r> {
    type Database: Database;
}

struct Any;

impl Database for Any {}

impl<'r> HasValueRef<'r> for Any {
    // Make sure we don't have issues when the GAT assumption
    // `<Any as HasValue<'r>>::Database = Any` isn't universally
    // parameterized over `'r`.
    type Database = Any;
}

fn main() {}