diff --git a/Cargo.lock b/Cargo.lock index 4a4f267..5fc25f2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,4 +4,4 @@ version = 3 [[package]] name = "higher-order-closure" -version = "0.0.3" +version = "0.0.4" diff --git a/Cargo.toml b/Cargo.toml index f4e985f..0648ba0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ name = "higher-order-closure" authors = [ "Daniel Henry-Mantilla " ] -version = "0.0.3" # Keep in sync +version = "0.0.4" # Keep in sync edition = "2018" license = "Zlib OR MIT OR Apache-2.0" diff --git a/README.md b/README.md index f892e99..58c8c37 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,11 @@ https://github.com/danielhenrymantilla/higher-order-closure.rs/actions) ### Motivation / Rationale +See the [RFC #3216](https://github.com/rust-lang/rfcs/pull/3216): this crate +is a Proof-of-Concept of the ideas laid out there[^1]. + +[ˆ1]: with the exception of allowing elided lifetimes to have a meaning (chosen higher-order), which the RFC cannot do in order to be future-proof. +
Click to expand The following example fails to compile: @@ -245,7 +250,7 @@ fn main () #### Outer generic parameters -Given how the macro internally works[^1], generic parameters "in scope" won't, +Given how the macro internally works[^2], generic parameters "in scope" won't, by default, be available in the closure signature (similar to `const`s and nested function or type definitions). @@ -341,7 +346,7 @@ fn main () } ``` -[^1]: it generates a "closure identity" helper function, with the desired +[^2]: it generates a "closure identity" helper function, with the desired higher-order signatures embedded as `Fn` bounds on its parameters, thus making it act as a "funnel" that only lets closure with the right signature pass through).