2024-02-16 14:02:50 -06:00
|
|
|
//@ revisions: current next
|
|
|
|
//@[next] compile-flags: -Znext-solver
|
|
|
|
//@[next] known-bug: trait-system-refactor-initiative#71
|
|
|
|
//@[current] 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);
|
|
|
|
impl<T> Foo for Wrap<T> where T: Fn(i32) {}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
needs_foo(|x| {
|
|
|
|
x.to_string();
|
|
|
|
});
|
|
|
|
}
|