blob: da6f2908ab1f2ded8318c019b61f9f6feb2dc71c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
//@ compile-flags: -Znext-solver
//@ check-pass
// If we normalize using the impl here the constraints from normalization and
// trait goals can differ. This is especially bad if normalization results
// in stronger constraints.
trait Trait<'a> {
type Assoc;
}
impl<T> Trait<'static> for T {
type Assoc = ();
}
// normalizing requires `'a == 'static`, the trait bound does not.
fn foo<'a, T: Trait<'a>>(_: T::Assoc) {}
fn main() {}
|