2024-02-16 20:02:50 +00:00
|
|
|
//@ compile-flags: -Znext-solver
|
|
|
|
//@ check-pass
|
2023-02-22 01:26:01 +00:00
|
|
|
|
|
|
|
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() {}
|