2023-10-18 13:59:02 -05:00
|
|
|
// revisions: current next
|
2023-12-14 06:11:28 -06:00
|
|
|
//[next] compile-flags: -Znext-solver
|
2023-10-18 13:59:02 -05:00
|
|
|
//[next] known-bug: trait-system-refactor-initiative#71
|
|
|
|
//[current] check-pass
|
|
|
|
|
|
|
|
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();
|
|
|
|
});
|
|
|
|
}
|