From cb88439ac9d11e60412ac86ab0c47ba88649c9c6 Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Thu, 5 Nov 2020 13:26:39 +0900 Subject: [PATCH] Update src/coercions.md --- src/coercions.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/coercions.md b/src/coercions.md index d6547fe..065a9e1 100644 --- a/src/coercions.md +++ b/src/coercions.md @@ -18,7 +18,9 @@ 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` +* Non-capturing closure to a function pointer ([RFC 1558], e.g. `|| 8usize` to `fn() -> usize`) + +[RFC 1558]: https://rust-lang.github.io/rfcs/1558-closure-to-fn-coercion.html `CoerceUnsized> for Pointer where T: Unsize` is implemented for all pointer types (including smart pointers like Box and Rc). Unsize is