We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ea054bb + cb88439 commit 23c49f1Copy full SHA for 23c49f1
src/coercions.md
@@ -18,6 +18,9 @@ Coercion is allowed between the following types:
18
* `&mut T` to `*mut T`
19
* Unsizing: `T` to `U` if `T` implements `CoerceUnsized<U>`
20
* Deref coercion: Expression `&x` of type `&T` to `&*x` of type `&U` if `T` derefs to `U` (i.e. `T: Deref<Target=U>`)
21
+* Non-capturing closure to a function pointer ([RFC 1558], e.g. `|| 8usize` to `fn() -> usize`)
22
+
23
+[RFC 1558]: https://rust-lang.github.io/rfcs/1558-closure-to-fn-coercion.html
24
25
`CoerceUnsized<Pointer<U>> for Pointer<T> where T: Unsize<U>` is implemented
26
for all pointer types (including smart pointers like Box and Rc). Unsize is
0 commit comments