Skip to content

Commit cb88439

Browse files
authored
Update src/coercions.md
1 parent 393e54b commit cb88439

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/coercions.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +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](https://rust-lang.github.io/rfcs/1558-closure-to-fn-coercion.html)), e.g. `|| 8usize` to `fn() -> usize`
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
2224

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

0 commit comments

Comments
 (0)