-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-lifetimesArea: Lifetimes / regionsArea: Lifetimes / regionsT-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
fn f<F>(_: F) where F: for<'a> Fn(&'a u8, for<'b> fn(&'b u8)) {}
fn main() {
f(|_: (), _: ()| {});
}
error[E0631]: type mismatch in closure arguments
--> src/main.rs:4:5
|
4 | f(|_: (), _: ()| {});
| ^ ----------------- found signature of `fn((), ()) -> _`
| |
| expected signature of `for<'a> fn(&'a u8, fn(&'b u8)) -> _`
|
= note: required by `f`
Here, only for<'b>
is omitted.
Meta
$ rustc --version --verbose
rustc 1.22.0-nightly (930d3b17d 2017-09-26)
binary: rustc
commit-hash: 930d3b17dd91b6564cf535ac717c688db757be5d
commit-date: 2017-09-26
host: x86_64-unknown-linux-gnu
release: 1.22.0-nightly
LLVM version: 4.0
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-lifetimesArea: Lifetimes / regionsArea: Lifetimes / regionsT-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.