-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Open
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
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> {}
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsC-bugCategory: This is a bug.Category: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.