blob: 8b18e4ef9e7437c02ca4a07c9091b5bbe82cbf3c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
// revisions: current next
//[next] compile-flags: -Znext-solver
//[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();
});
}
|