blob: dc96652f82ff0d4fae3802fadd7237ecff06ee81 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
//@ compile-flags: -Znext-solver
//@ check-pass
// `(): Trait` is a global where-bound with a projection bound.
// This previously resulted in ambiguity as we considered both
// the impl and the where-bound while normalizing.
trait Trait {
type Assoc;
}
impl Trait for () {
type Assoc = &'static ();
}
fn foo<'a>(x: <() as Trait>::Assoc)
where
(): Trait<Assoc = &'a ()>,
{
}
fn main() {}
|