summaryrefslogtreecommitdiffstats
path: root/tests/ui/traits/new-solver/alias_eq_substs_eq_not_intercrate.rs
blob: d4cc380fa211b1c87c8750cf4039e90650106eaf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// compile-flags: -Ztrait-solver=next

// check that a `alias-eq(<?0 as TraitB>::Assoc, <T as TraitB>::Assoc)` goal fails.

// FIXME(deferred_projection_equality): add a test that this is true during coherence

trait TraitB {
    type Assoc;
}

fn needs_a<T: TraitB>() -> T::Assoc {
    unimplemented!()
}

fn bar<T: TraitB>() {
    let _: <_ as TraitB>::Assoc = needs_a::<T>();
    //~^ error: type annotations needed
}

fn main() {}