blob: c886aeeda3e4690e6f246c4698b41d46a3dd364c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
// compile-flags: -Ztrait-solver=next
// check-pass
trait Trait<'a> {
type Item: for<'b> Trait2<'b>;
}
trait Trait2<'a> {}
impl Trait2<'_> for () {}
fn needs_trait(_: Box<impl for<'a> Trait<'a> + ?Sized>) {}
fn foo(x: Box<dyn for<'a> Trait<'a, Item = ()>>) {
needs_trait(x);
}
fn main() {}
|