blob: 2613725235cd380c2b4b7be121698f16a1ee55ff (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
trait MyTrait<T> {}
struct Foo;
impl<T> MyTrait<T> for Foo {}
fn bar<Input>() -> impl MyTrait<Input> {
Foo
}
fn foo() -> impl for<'a> MyTrait<&'a str> {
bar() //~ ERROR implementation of `MyTrait` is not general enough
}
fn main() {}
|