From 393e54b74919b2ca7233e180b3e98aceba4a1d17 Mon Sep 17 00:00:00 2001 From: mexus Date: Sun, 27 Sep 2020 16:39:05 +0300 Subject: [PATCH] coercions.md: non-capturing closures to function pointers --- src/coercions.md | 1 + 1 file changed, 1 insertion(+) diff --git a/src/coercions.md b/src/coercions.md index 5a597b4..d6547fe 100644 --- a/src/coercions.md +++ b/src/coercions.md @@ -18,6 +18,7 @@ Coercion is allowed between the following types: * `&mut T` to `*mut T` * Unsizing: `T` to `U` if `T` implements `CoerceUnsized` * Deref coercion: Expression `&x` of type `&T` to `&*x` of type `&U` if `T` derefs to `U` (i.e. `T: Deref`) +* Non-capturing closure to a function pointer ([RFC 1558](https://rust-lang.github.io/rfcs/1558-closure-to-fn-coercion.html)), e.g. `|| 8usize` to `fn() -> usize` `CoerceUnsized> for Pointer where T: Unsize` is implemented for all pointer types (including smart pointers like Box and Rc). Unsize is