Skip to content

Commit 23c49f1

Browse files
authored
Merge pull request #238 from mexus/master
2 parents ea054bb + cb88439 commit 23c49f1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/coercions.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ Coercion is allowed between the following types:
1818
* `&mut T` to `*mut T`
1919
* Unsizing: `T` to `U` if `T` implements `CoerceUnsized<U>`
2020
* 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
2124

2225
`CoerceUnsized<Pointer<U>> for Pointer<T> where T: Unsize<U>` is implemented
2326
for all pointer types (including smart pointers like Box and Rc). Unsize is

0 commit comments

Comments
 (0)