about summary refs log tree commit diff
path: root/tests/ui/associated-inherent-types/not-found-self-type-differs.rs
blob: 76c5d4e7f69802ba776e87100c9df938b0061a13 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#![feature(inherent_associated_types)]
#![allow(incomplete_features)]

struct Family<T>(T);

impl Family<()> {
    type Proj = ();
}

impl<T> Family<Result<T, ()>> {
    type Proj = Self;
}

fn main() {
    let _: Family<Option<()>>::Proj; //~ ERROR associated type `Proj` not found for `Family<Option<()>>`
    let _: Family<std::path::PathBuf>::Proj = (); //~ ERROR associated type `Proj` not found for `Family<PathBuf>`
}