2023-10-18 13:59:02 -05:00
|
|
|
//@ revisions: current next
|
2024-03-10 20:18:41 -05:00
|
|
|
//@ ignore-compare-mode-next-solver (explicit revisions)
|
2023-12-14 06:11:28 -06:00
|
|
|
//@[next] compile-flags: -Znext-solver
|
2024-03-12 08:26:30 -05:00
|
|
|
//@ check-pass
|
2023-10-18 13:59:02 -05:00
|
|
|
|
|
|
|
trait Foo {}
|
|
|
|
fn needs_foo<T>(_: T)
|
|
|
|
where
|
|
|
|
Wrap<T>: Foo,
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
struct Wrap<T>(T);
|
2024-03-12 08:26:30 -05:00
|
|
|
impl<T> Foo for Wrap<T> where T: for<'a> Fn(&'a i32) {}
|
2023-10-18 13:59:02 -05:00
|
|
|
|
|
|
|
fn main() {
|
|
|
|
needs_foo(|x| {
|
|
|
|
x.to_string();
|
|
|
|
});
|
|
|
|
}
|