Open
Description
the full error is
error[E0279]: the requirement `for<'b> 'b : ` is not satisfied (`expected bound lifetime parameter 'b, found concrete lifetime`)
--> <anon>:2:5
|
2 | test::<FooS>(&mut 42);
| ^^^^^^^^^^^^
|
= note: required because of the requirements on the impl of `for<'b> Foo<'b>` for `FooS<'_>`
= note: required by `test`
reproducible example on stable, beta and nightly:
fn main() {
test::<FooS>(&mut 42);
}
trait Foo<'a> {}
struct FooS<'a> {
data: &'a mut u32,
}
impl<'a, 'b: 'a> Foo<'b> for FooS<'a> {}
fn test<'a, F>(data: &'a mut u32) where F: for<'b> Foo<'b> {}